Skip to content

Consider unifying span_id with the logfmt event_fields mechanism #2497

@adnandnv

Description

@adnandnv

Context

PR #2354 added an "event fields" mechanism to the logfmt layer: configured span attributes
(e.g. component, object_id) are surfaced onto log lines and inherited from parent spans.
span_id is still handled by separate special-case code and, unlike those fields, is not
inherited in the logfmt path. @Matthias247 suggested it could go through the same mechanism
(PR #2354).

Worth a look

  • span_id is a per-work-unit correlation id (set on trace-root spans); its purpose is to
    group every log line of one unit of work ("filter by span_id to see the whole iteration").
  • api-core's own log stream / Debug WebUI already inherits it (enclosing_span_id walks the
    span scope), but the logfmt text path does not — so nested lines can drop it.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions