Renovate Bot 4161926944
Some checks failed
CI & Release / ci (push) Failing after 2m47s
CI & Release / release (push) Has been skipped
chore(deps): update devdependencies (non-major) (#13)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [go.opentelemetry.io/collector/component](https://github.com/open-telemetry/opentelemetry-collector) | require | minor | `v1.31.0` -> `v1.32.0` |
| [go.opentelemetry.io/collector/component/componenttest](https://github.com/open-telemetry/opentelemetry-collector) | require | minor | `v0.125.0` -> `v0.126.0` |
| [go.opentelemetry.io/collector/confmap](https://github.com/open-telemetry/opentelemetry-collector) | require | minor | `v1.31.0` -> `v1.32.0` |
| [go.opentelemetry.io/collector/consumer](https://github.com/open-telemetry/opentelemetry-collector) | require | minor | `v1.31.0` -> `v1.32.0` |
| [go.opentelemetry.io/collector/consumer/consumertest](https://github.com/open-telemetry/opentelemetry-collector) | require | minor | `v0.125.0` -> `v0.126.0` |
| [go.opentelemetry.io/collector/pdata](https://github.com/open-telemetry/opentelemetry-collector) | require | minor | `v1.31.0` -> `v1.32.0` |
| [go.opentelemetry.io/collector/processor](https://github.com/open-telemetry/opentelemetry-collector) | require | minor | `v1.31.0` -> `v1.32.0` |
| [go.opentelemetry.io/collector/processor/processortest](https://github.com/open-telemetry/opentelemetry-collector) | require | minor | `v0.125.0` -> `v0.126.0` |

---

### Release Notes

<details>
<summary>open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/component)</summary>

### [`v1.32.0`](https://github.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v1320v01260)

##### 🛑 Breaking changes 🛑

-   `configauth`: Removes deprecated `configauth.Authentication` and `extensionauthtest.NewErrorClient` ([#&#8203;12992](https://github.com/open-telemetry/opentelemetry-collector/issues/12992))
    The following have been removed:
    -   `configauth.Authentication` use `configauth.Config` instead
    -   `extensionauthtest.NewErrorClient` use `extensionauthtest.NewErr` instead

##### 💡 Enhancements 💡

-   `service`: Replace `go.opentelemetry.io/collector/semconv` usage with `go.opentelemetry.io/otel/semconv` ([#&#8203;12991](https://github.com/open-telemetry/opentelemetry-collector/issues/12991))
-   `confmap`: Update the behavior of the confmap.enableMergeAppendOption feature gate to merge only component lists. ([#&#8203;12926](https://github.com/open-telemetry/opentelemetry-collector/issues/12926))
-   `service`: Add item count metrics defined in Pipeline Component Telemetry RFC ([#&#8203;12812](https://github.com/open-telemetry/opentelemetry-collector/issues/12812))
    See [Pipeline Component Telemetry RFC](https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/rfcs/component-universal-telemetry.md) for more details:
    -   `otelcol.receiver.produced.items`
    -   `otelcol.processor.consumed.items`
    -   `otelcol.processor.produced.items`
    -   `otelcol.connector.consumed.items`
    -   `otelcol.connector.produced.items`
    -   `otelcol.exporter.consumed.items`
-   `tls`: Add trusted platform module (TPM) support to TLS authentication. ([#&#8203;12801](https://github.com/open-telemetry/opentelemetry-collector/issues/12801))
    Now the TLS allows the use of TPM for loading private keys (e.g. in TSS2 format).

##### 🧰 Bug fixes 🧰

-   `exporterhelper`: Add validation error for batch config if min_size is greater than queue_size. ([#&#8203;12948](https://github.com/open-telemetry/opentelemetry-collector/issues/12948))

-   `telemetry`: Allocate less memory per component when OTLP exporting of logs is disabled ([#&#8203;13014](https://github.com/open-telemetry/opentelemetry-collector/issues/13014))

-   `confmap`: Use reflect.DeepEqual to avoid panic when confmap.enableMergeAppendOption feature gate is enabled. ([#&#8203;12932](https://github.com/open-telemetry/opentelemetry-collector/issues/12932))

-   `internal telemetry`: Add resource attributes from telemetry.resource to the logger ([#&#8203;12582](https://github.com/open-telemetry/opentelemetry-collector/issues/12582))
    Resource attributes from telemetry.resource were not added to the internal
    console logs.

    Now, they are added to the logger as part of the "resource" field.

-   `confighttp and configcompression`: Fix handling of `snappy` content-encoding in a backwards-compatible way ([#&#8203;10584](https://github.com/open-telemetry/opentelemetry-collector/issues/10584), [#&#8203;12825](https://github.com/open-telemetry/opentelemetry-collector/issues/12825))
    The collector used the Snappy compression type of "framed" to handle the HTTP
    content-encoding "snappy".  However, this encoding is typically used to indicate
    the "block" compression variant of "snappy".  This change allows the collector to:
    -   When receiving a request with encoding 'snappy', the server endpoints will peek
        at the first bytes of the payload to determine if it is "framed" or "block" snappy,
        and will decompress accordingly.  This is a backwards-compatible change.
    If the feature-gate "confighttp.framedSnappy" is enabled, you'll see new behavior for both client and server:
    -   Client compression type "snappy" will now compress to the "block" variant of snappy
        instead of "framed". Client compression type "x-snappy-framed" will now compress to the "framed" variant of snappy.
    -   Servers will accept both "snappy" and "x-snappy-framed" as valid content-encodings.

-   `tlsconfig`: Disable TPM tests on MacOS/Darwin ([#&#8203;12964](https://github.com/open-telemetry/opentelemetry-collector/issues/12964))

<!-- 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNjMuMSIsInVwZGF0ZWRJblZlciI6IjM5LjI2My4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://gitea.t000-n.de/t.behrendt/tracebasedlogsampler/pulls/13
Co-authored-by: Renovate Bot <renovate@t00n.de>
Co-committed-by: Renovate Bot <renovate@t00n.de>
2025-05-20 20:38:38 +02:00
2025-04-29 18:15:33 +02:00
2025-04-29 18:15:33 +02:00
2025-04-29 18:15:33 +02:00
2025-04-29 18:15:33 +02:00
2025-04-29 18:15:33 +02:00
2025-05-02 18:25:39 +02:00
2025-04-29 18:15:33 +02:00
2025-05-06 20:59:07 +02:00
2025-05-06 20:59:07 +02:00
2025-04-30 21:12:41 +02:00
2025-04-29 18:15:33 +02:00

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, the traceId is 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
Description
Trace based log sampler for OpenTelemetry Collector
Readme MIT 563 KiB
Languages
Go 99.7%
Makefile 0.3%