redpanda-data / redpanda-data/connect
Benthos logs should include trace_id, span_id and trace_flags when tracing is enabled
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 8.8k
- Forks
- 969
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 64
Description
If we have the tracing system enabled, all the application logs should include the trace_id, span_id and trace_flags as stated in Opentelemetry's specification: https://github.com/open-telemetry/opentelemetry-specification/blob/5d9cef817415a15aaa4883e184a38adec79096ed/specification/compatibility/logging_trace_context.md#overview
This is necessary to be able to correlate logs and traces.
Our log currently are non-OTLP formatted, so:
Overview
OTLP Logs Records have top level fields representing trace context. This document defines how trace context should be recorded in non-OTLP Log Formats.
To summarize, the following field names should be used in legacy formats:
- "trace_id" for TraceId, hex-encoded.
- "span_id" for SpanId, hex-encoded.
- "trace_flags" for trace flags, formatted according to W3C traceflags format.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests. Start by locating Benthos's application logging and tracing integration, then check how logs are emitted when tracing is enabled. Done means non-OTLP logs include hex-encoded trace_id and span_id fields plus trace_flags using the specified W3C format, with coverage for tracing-enabled behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100