otel: add more processors and change filter ex to group ex. (#51510)

This commit is contained in:
William Bezuidenhout 2023-05-05 19:13:31 +02:00 committed by GitHub
parent 8dc8245cda
commit 2aed3b08d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 10 deletions

View File

@ -30,7 +30,9 @@ extensions:
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v$OTEL_COLLECTOR_VERSION
processors:
- gomod: go.opentelemetry.io/collector/processor/batchprocessor v$OTEL_COLLECTOR_VERSION
# Contrib extensions - https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v$OTEL_COLLECTOR_VERSION
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v$OTEL_COLLECTOR_VERSION
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v$OTEL_COLLECTOR_VERSION
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v$OTEL_COLLECTOR_VERSION

View File

@ -26,17 +26,19 @@ extensions:
service:
extensions: [health_check, zpages]
pipelines:
traces/web-app:
traces/sampled:
receivers: [otlp]
processors: [filter/web-app]
processors: [groupbytrace, tail_sampling]
exporters: [jaeger]
processors:
groupbytrace:
num_traces: 100000
tail_sampling:
# Wait time since the first span of a trace before making a sampling decision
decision_wait: 30s # default value = 30s
# Number of traces kept in memory
num_traces: 50000 # default value = 50000
num_traces: 100000 # default value = 50000
# Expected number of new traces (helps in allocating data structures)
expected_new_traces_per_sec: 10 # default value = 0
# Recommended reading to understand how the policies are applied:
@ -56,10 +58,3 @@ processors:
probabilistic: { sampling_percentage: 10 },
},
]
filter/web-app:
spans:
# ONLY include traces where 'service.name' matches "web-app" and exclude ALL other traces from the pipeline
include:
match_type: strict
services:
- 'web-app'