redpanda-data / redpanda-data/connect

Benthos logs should include trace_id, span_id and trace_flags when tracing is enabled

Open
#2,382 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement observability
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.