795e96270aadcacf75f86c21d235c13dc70b07f3
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [go.opentelemetry.io/collector/processor/processortest](https://github.com/open-telemetry/opentelemetry-collector) | `v0.151.0` → `v0.152.0` |  |  | --- ### Release Notes <details> <summary>open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/processor/processortest)</summary> ### [`v0.152.0`](https://github.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v1580v01520) [Compare Source](https://github.com/open-telemetry/opentelemetry-collector/compare/v0.151.0...v0.152.0) ##### 💡 Enhancements 💡 - `pkg/exporterhelper`: Add `otelcol_exporter_in_flight_requests` metric to track the number of export requests currently in-flight per exporter. ([#​15009](https://github.com/open-telemetry/opentelemetry-collector/issues/15009)) This UpDownCounter increments in startOp and decrements in endOp, allowing operators to monitor concurrent export activity and detect when an exporter is saturating its worker pool. ##### 🧰 Bug fixes 🧰 - `pkg/confighttp`: Close the original request body after reading block-format `Content-Encoding: snappy` requests. ([#​15262](https://github.com/open-telemetry/opentelemetry-collector/issues/15262)) - `pkg/confighttp`: Recover from panics in decompression libraries, return HTTP 400 instead of 500. ([#​13228](https://github.com/open-telemetry/opentelemetry-collector/issues/13228)) - `pkg/confighttp`: Enforce `max_request_body_size` on `Content-Encoding: snappy` requests before the decoded buffer is allocated. ([#​15252](https://github.com/open-telemetry/opentelemetry-collector/issues/15252)) - `pkg/otelcol`: Stop emitting verbose gRPC transport messages at WARN during normal client disconnect. ([#​5169](https://github.com/open-telemetry/opentelemetry-collector/issues/5169)) grpc-go gates chatty per-RPC notices (e.g. "HandleStreams failed to read frame: connection reset by peer") behind `LoggerV2.V(2)`. zapgrpc.Logger.V conflates grpclog verbosity with zap severity, so V(2) returns true whenever WARN is enabled and these messages emit at WARN. Wrap the installed grpclog.LoggerV2 with a corrected V() that compares against a fixed verbosity threshold, matching grpclog's intended semantics. See [uber-go/zap#1544](https://github.com/uber-go/zap/issues/1544). - `pkg/pdata`: `pcommon.Value.AsString` no longer HTML-escapes `<`, `>`, and `&` inside `ValueTypeMap` and `ValueTypeSlice` values, matching the behavior already used for `ValueTypeStr`. ([#​14662](https://github.com/open-telemetry/opentelemetry-collector/issues/14662)) - `pkg/service`: Fix Prometheus config defaults mismatch when host is explicitly set in telemetry configuration. ([#​13867](https://github.com/open-telemetry/opentelemetry-collector/issues/13867)) When users explicitly configured the telemetry metrics section (e.g. to change the host), the Prometheus exporter boolean fields (WithoutScopeInfo, WithoutUnits, WithoutTypeSuffix) defaulted to nil/false instead of true, causing metric name format changes compared to the implicit default configuration. This fix applies the correct defaults during config unmarshaling. - `pkg/service`: Return noop tracer provider when no trace processors are defined ([#​15135](https://github.com/open-telemetry/opentelemetry-collector/issues/15135)) <!-- previous-version --> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My41LjQiLCJ1cGRhdGVkSW5WZXIiOiI0My41LjQiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=--> Reviewed-on: https://gitea.t000-n.de/t.behrendt/tracebasedlogsampler/pulls/67 Reviewed-by: t.behrendt <t.behrendt@noreply.localhost> Co-authored-by: Renovate Bot <renovate@t00n.de> Co-committed-by: Renovate Bot <renovate@t00n.de>
Trace-based Log Sampler
This processor is used to sample logs based on the sampling decision of the trace they correlate to.
How It Works
When a trace is sampled, the processor caches its traceId.
Logs are then filtered:
- If a log references a known sampled
traceId, it is beimg forwarded. - If a log references an unknown or unsampled
traceId, it is buffered for a certain amount of time. After the buffer time expires, thetraceIdis checked again. If it exists, the log is forwarded. If not, it is discarded.
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
| buffer_duration_traces | duration | 180s | The duration for which traceIds are being remembered. The timer starts when the first trace or span of one traceId is received. |
| buffer_duration_logs | duration | 90s | The duration for which logs are being buffered for, before being re-evaluated. If your pipeline includes e.g. a tailbasedsampler processor, set this to above it's collection time. This ensures that logs "wait" until the traces have been processed |
Example Configuration
The followinh config is an example configuration for the processor. It is configured to buffer traceIds for 180 seconds and logs for 90 seconds.
Note that both a traces and logs pipeline is required and both have to use the same instance of the processor.
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
exporters:
otlp:
endpoint: 0.0.0.0:4317
processors:
logtracesampler:
buffer_duration_traces: 180s
buffer_duration_logs: 90s
service:
pipelines:
traces:
receivers: [otlp]
processors: [logtracesampler]
exporters: [otlp]
logs:
receivers: [otlp]
processors: [logtracesampler]
exporters: [otlp]
Building
When building a custom collector you can add this processor to the mainfest like the following (refer to Building a custom collector for more information):
processors:
- gomod: gitea.t000-n.de/t.behrendt/tracebasedlogsampler v0.0.0
Languages
Go
99.7%
Makefile
0.3%