Skip to content

Commit d4715dc

Browse files
authored
feat(collector): add gen_ai_normalizer processor for Traceloop telemetry (#3604)
Add the gen_ai_normalizer processor to the traces pipeline to convert OpenLLMetry/Traceloop instrumentation spans (from the agent service) into official OpenTelemetry GenAI semantic conventions (gen_ai.* attributes). The processor uses the built-in "openllmetry" source mapping which handles the Traceloop SDK's attribute format. Bump collector-contrib from v0.151.0 to v0.155.0 which includes the gen_ai_normalizer processor (added in v0.154.0, Alpha stability). Closes #3526 Assisted-by: Claude Opus 4.8 Signed-off-by: Shenoy Pratik Gurudatt <4348487+ps48@users.noreply.github.com> Co-authored-by: Shenoy Pratik Gurudatt <4348487+ps48@users.noreply.github.com>
1 parent fff66b9 commit d4715dc

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ OTEL_JAVA_AGENT_VERSION=2.28.1
88
OPENTELEMETRY_CPP_VERSION=1.27.0
99

1010
# Dependent images
11-
COLLECTOR_CONTRIB_IMAGE=ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:0.151.0
11+
COLLECTOR_CONTRIB_IMAGE=ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:0.155.0
1212
FLAGD_IMAGE=ghcr.io/open-feature/flagd:v0.14.2
1313
GRAFANA_IMAGE=grafana/grafana:13.0.1
1414
JAEGERTRACING_IMAGE=quay.io/jaegertracing/jaeger:2.14.1

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ the release.
1515
* [accounting] Run the Kafka consumer as a hosted background service so process
1616
shutdown can stop the consumer cleanly
1717
([#3608](https://github.com/open-telemetry/opentelemetry-demo/pull/3608))
18+
* [collector] Add `gen_ai_normalizer` processor to the traces pipeline to
19+
convert OpenLLMetry/Traceloop instrumentation telemetry (from the agent
20+
service) into official GenAI semantic conventions (`gen_ai.*` attributes).
21+
Bump collector-contrib to v0.155.0 which includes the processor
22+
([#3526](https://github.com/open-telemetry/opentelemetry-demo/issues/3526))
1823
* [llm] Increase `llm` service memory limit from 50M to 100M to prevent a
1924
startup restart loop caused by the container exceeding its memory limit
2025
([#2944](https://github.com/open-telemetry/opentelemetry-demo/issues/2944))

src/otel-collector/otelcol-config.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,10 @@ processors:
187187
# Upstream Issue: https://github.com/open-telemetry/opentelemetry-collector/issues/15221
188188
- set(attributes["otelcol_signal"], attributes["otelcol.signal"]) where attributes["otelcol.signal"] != nil and not IsMap(attributes["otelcol.signal"])
189189
- delete_key(attributes, "otelcol.signal") where attributes["otelcol_signal"] != nil
190+
gen_ai_normalizer:
191+
sources:
192+
- name: openllmetry
193+
190194
transform/sanitize_spans:
191195
error_mode: ignore
192196
trace_statements:
@@ -240,7 +244,7 @@ service:
240244
pipelines:
241245
traces:
242246
receivers: [otlp]
243-
processors: [resourcedetection, memory_limiter, transform/sanitize_spans]
247+
processors: [resourcedetection, memory_limiter, transform/sanitize_spans, gen_ai_normalizer]
244248
exporters: [debug, span_metrics]
245249
metrics:
246250
receivers: [docker_stats, http_check/frontend-proxy, host_metrics, nginx, otlp, redis, postgresql, prometheus/ad, span_metrics]

0 commit comments

Comments
 (0)