Skip to content

Tail sampling fails to start when decision wait is lower than 1s #26354

Closed
@jpkrohling

Description

@jpkrohling

Component(s)

processor/tailsampling

What happened?

When setting the decision_wait parameter to a value lower than 1s, the following error message is shown during the startup:

2023/08/31 09:28:53 collector server run finished with error: failed to build pipelines: failed to create "tail_sampling" processor, in pipeline "traces/export": invalid number of batches, it must be greater than zero

A workaround is to use a decision wait of at least 1s.

Collector version

v0.84.0

Environment information

No response

OpenTelemetry Collector configuration

receivers:
  otlp:
    protocols:
      grpc:

processors:
  tail_sampling:
    decision_wait: 500ms
    num_traces: 50_000
    expected_new_traces_per_sec: 10_000
    policies:
      [
          {
            name: only-10-percent,
            type: probabilistic,
            probabilistic: {sampling_percentage: 10}
          },
      ]

exporters:
  logging:

connectors:

service:
  pipelines:
    traces:
      receivers:
        - otlp
      processors:
        - tail_sampling
      exporters:
        - logging

Log output

2023-08-31T09:31:48.873-0300    info    service/telemetry.go:84 Setting up own telemetry...
2023-08-31T09:31:48.874-0300    info    service/telemetry.go:201        Serving Prometheus metrics      {"address": ":8888", "level": "Basic"}
2023-08-31T09:31:48.874-0300    info    [email protected]/exporter.go:275        Development component. May change in the future.        {"kind": "exporter", "data_type": "traces", "name": "logging"}
Error: failed to build pipelines: failed to create "tail_sampling" processor, in pipeline "traces": invalid number of batches, it must be greater than zero
2023/08/31 09:31:48 collector server run finished with error: failed to build pipelines: failed to create "tail_sampling" processor, in pipeline "traces": invalid number of batches, it must be greater than zero

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions