8b0fa209b16f7a8d2cbdc35cf3e9ddfb41bf9e85
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/component](https://github.com/open-telemetry/opentelemetry-collector) | `v1.59.0` → `v1.60.0` |  |  | | [go.opentelemetry.io/collector/component/componenttest](https://github.com/open-telemetry/opentelemetry-collector) | `v0.153.0` → `v0.154.0` |  |  | | [go.opentelemetry.io/collector/confmap](https://github.com/open-telemetry/opentelemetry-collector) | `v1.59.0` → `v1.60.0` |  |  | | [go.opentelemetry.io/collector/consumer](https://github.com/open-telemetry/opentelemetry-collector) | `v1.59.0` → `v1.60.0` |  |  | | [go.opentelemetry.io/collector/consumer/consumertest](https://github.com/open-telemetry/opentelemetry-collector) | `v0.153.0` → `v0.154.0` |  |  | | [go.opentelemetry.io/collector/pdata](https://github.com/open-telemetry/opentelemetry-collector) | `v1.59.0` → `v1.60.0` |  |  | | [go.opentelemetry.io/collector/processor](https://github.com/open-telemetry/opentelemetry-collector) | `v1.59.0` → `v1.60.0` |  |  | | [go.opentelemetry.io/collector/processor/processortest](https://github.com/open-telemetry/opentelemetry-collector) | `v0.153.0` → `v0.154.0` |  |  | --- ### Release Notes <details> <summary>open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/component)</summary> ### [`v1.60.0`](https://github.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v1600v01540) ##### 🛑 Breaking changes 🛑 - `cmd/builder`: The `--skip-get-modules` flag will no longer regenerate your `go.mod` file. ([#​15390](https://github.com/open-telemetry/opentelemetry-collector/issues/15390)) This is mostly a bug fix, as it led to adverse behaviour that was unintended in the described flow in the README. Now when you run `--skip-get-modules`, your `go.mod` file will truly be untouched by `ocb` as the info log claims. ##### 💡 Enhancements 💡 - `pkg/config/configtls`: Add `include_insecure_cipher_suites` to configtls to enable insecure cipher suites. Insecure cipher suites are disabled by default for security. ([#​13829](https://github.com/open-telemetry/opentelemetry-collector/issues/13829)) - `pkg/confighttp`: Add `ExposedHeaders` field to `CORSConfig` to allow setting the `Access-Control-Expose-Headers` response header. ([#​15119](https://github.com/open-telemetry/opentelemetry-collector/issues/15119)) ##### 🧰 Bug fixes 🧰 - `cmd/mdatagen`: Removes the extra line in the README.md between status and description ([#​15306](https://github.com/open-telemetry/opentelemetry-collector/issues/15306)) - `pkg/exporterhelper`: Fix nil-pointer panic in `sending_queue::batch` Unmarshal when `sending_queue::sizer` is set and `sending_queue::batch::enabled` is false. ([#​14687](https://github.com/open-telemetry/opentelemetry-collector/issues/14687)) When `sending_queue::sizer` was set and `sending_queue::batch::enabled: false` cleared the batch Optional to None, the sizer-inheritance branch in `queuebatch.Config.Unmarshal` dereferenced a nil Optional and crashed the collector at startup. The branch now also requires `Batch.HasValue()`. <!-- 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. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- 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/75 Reviewed-by: t.behrendt <2+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%