Commit 207621e
perf(datapath): gate message OTEL propagation on OTLP config (agntcy#1503)
Datapath: Per-message OpenTelemetry work (extract W3C context from
metadata, build a slim_process_message span, inject context back into
metadata) now runs only when OpenTelemetry export is enabled in tracing
config. That removes HashMap scans, span setup, and metadata writes from
the hot path when OTLP is off.
Fan-out publishes: Trace context is prepared once before cloning to
multiple subscribers, instead of repeating extract/span/inject on every
outbound send.
Spans: Source/destination/message type use Display field capture instead
of format!/extra String allocations; publish session ids use numeric
span attributes.
Tracing crate: Adds a small runtime flag set during
setup_tracing_subscriber() and exports otel_propagation_enabled() for
datapath.
Cleanup: Consolidates duplicated telemetry into helpers
(ProcessSpanTarget, create_process_span, apply_publish_span_attributes,
attach_trace_to_message, message_otel_active).
---------
Signed-off-by: Laszlo Puskas <lpuskas@cisco.com>
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Co-authored-by: Mauro Sardara <msardara@cisco.com>1 parent 2bf1318 commit 207621e
8 files changed
Lines changed: 332 additions & 180 deletions
File tree
- data-plane
- core
- datapath
- src
- messages
- tracing
- tasks
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments