Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(logging): support partialSuccess flag for batched ingestions #6092

Merged
merged 2 commits into from
May 25, 2022

Conversation

minherz
Copy link
Contributor

@minherz minherz commented May 25, 2022

Add PartialSuccess option to set partialSuccess flag in WriteLogEntries calls to true

Implements #3824

Add PartialSuccess option to set partialSuccess flag in WriteLogEntries calls to true
@minherz minherz requested review from a team as code owners May 25, 2022 03:38
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: logging Issues related to the Cloud Logging API. labels May 25, 2022
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels May 25, 2022
Copy link
Member

@codyoss codyoss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@minherz minherz merged commit 04d8ac9 into structured_logging May 25, 2022
@minherz minherz deleted the minherz/fix-3824 branch May 25, 2022 21:02
minherz added a commit that referenced this pull request May 25, 2022
)

Add PartialSuccess option to set partialSuccess flag in WriteLogEntries calls to true
minherz added a commit that referenced this pull request May 28, 2022
)

Add PartialSuccess option to set partialSuccess flag in WriteLogEntries calls to true
minherz added a commit that referenced this pull request Jun 10, 2022
)

Add PartialSuccess option to set partialSuccess flag in WriteLogEntries calls to true
minherz added a commit that referenced this pull request Jun 23, 2022
)

Add PartialSuccess option to set partialSuccess flag in WriteLogEntries calls to true
minherz added a commit that referenced this pull request Jun 25, 2022
)

Add PartialSuccess option to set partialSuccess flag in WriteLogEntries calls to true
minherz added a commit that referenced this pull request Jun 25, 2022
* fix(logging): revise automatic resource detection for ingested logs (#6022)

align resource detection with heuristics in logging libraries for other languages:
- use /sys/class/dmi/id/product_name to read a product name of the resource on Linux
- change resource detection heuristics in a way that the order of validation is not important
- reduce timeout and retrying logic when querying metadata server
- demand active metadata server for detecting GCP resources (for GCE, GAE, GKE, CR and CF)
- add test to validate resource detection heuristics

* feat(logging): implement auto-population of the calling source location (#6043)

add source location population for ingested log entries.
provide designated logger option: `SourceLocationPopulation` to control source population logic. The option can be initiated with the following values:

* `SourceLocationPopulation(DoNotPopulateSourceLocation)` - continue with existing behavior when the source location field of the log entry is not populated automatically (default)
* `SourceLocationPopulation(PopulateSourceLocationForDebugEntries)` - the source location is auto-populated for log entries with Debug severity
* `SourceLocationPopulation(DoNotPopulateSourceLocation)` - the source location is auto-populated for all log entries

Add a benchmark test to measure execution time for detectResource() to help with addressing issues like #5855.

```bash
go test -run=XXX -bench=BenchmarkDetectResource -benchtime 8s
goos: linux
goarch: amd64
pkg: cloud.google.com/go/logging
cpu: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
BenchmarkDetectResource-8       1000000000               2.291 ns/op
PASS
ok      cloud.google.com/go/logging     9.955s
```

When the  cloud.google.com/go/compute/metadata package will be modified to allow customizable retrying mechanism, this logic will be altered to minimize the number of retries for the initial call.

* feat(logging): support partialSuccess flag for batched ingestions (#6092)

Add PartialSuccess option to set partialSuccess flag in WriteLogEntries calls to true

* feat(logging): retrieve trace info from traceparent (#6101)

Add support for W3C trace context header: traceparent

* feat(logging): enable redirecting log ingestion to stdout/stderr (#6130)

Implement writing log entries to io.writer instead of ingesting them to Logging service.
the written log entries are Jsonified into one line strings following structured logging format.
Support protobuf payloads when passing the payload as protobuf.Any.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the Cloud Logging API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants