Skip to content

Commit ffc997d

Browse files
committed
chore(docker): accept traces in the local otel collector
The collector only defined a metrics pipeline, so pointing INTERNAL_OTEL_TRACE_EXPORTER_URL at it locally failed and the webapp fell back to the console span logger. Adds a traces pipeline with the debug exporter, which accepts and summarises spans - enough to exercise the whole client-side export path when profiling.
1 parent 0a572be commit ffc997d

1 file changed

Lines changed: 16 additions & 5 deletions

File tree

docker/config/otel-collector-config.yaml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# OpenTelemetry Collector configuration for local development
2-
# Receives OTLP metrics from the webapp and exposes them in Prometheus format
2+
# Receives OTLP metrics and traces from the webapp. Metrics are exposed in
3+
# Prometheus format; traces are counted by the debug exporter so you can point
4+
# INTERNAL_OTEL_TRACE_EXPORTER_URL at a real local endpoint instead of falling
5+
# back to the console span logger.
36

47
receivers:
58
otlp:
@@ -23,14 +26,22 @@ exporters:
2326
resource_to_telemetry_conversion:
2427
enabled: true
2528

26-
# Debug exporter for troubleshooting (optional, uncomment to enable)
27-
# debug:
28-
# verbosity: detailed
29+
# Traces are accepted and summarised rather than stored. That is enough to
30+
# exercise the whole client-side export path (serialize -> HTTP -> accept),
31+
# which is what a local run needs to measure. Raise to `detailed` to inspect
32+
# individual spans.
33+
debug:
34+
verbosity: basic
35+
sampling_initial: 5
36+
sampling_thereafter: 200
2937

3038
service:
3139
pipelines:
3240
metrics:
3341
receivers: [otlp]
3442
processors: [batch]
3543
exporters: [prometheus]
36-
44+
traces:
45+
receivers: [otlp]
46+
processors: [batch]
47+
exporters: [debug]

0 commit comments

Comments
 (0)