Skip to content

Fix return type annotation of _parse_trace_id_header in Jaeger propagator#5440

Open
Eason09053360 wants to merge 2 commits into
open-telemetry:mainfrom
Eason09053360:fix-jaeger-parse-trace-id-header-annotation
Open

Fix return type annotation of _parse_trace_id_header in Jaeger propagator#5440
Eason09053360 wants to merge 2 commits into
open-telemetry:mainfrom
Eason09053360:fix-jaeger-parse-trace-id-header-annotation

Conversation

@Eason09053360

@Eason09053360 Eason09053360 commented Jul 19, 2026

Copy link
Copy Markdown

Description

_parse_trace_id_header in the Jaeger propagator is annotated as returning tuple[int] (a tuple of exactly one element), but every return path yields a 3-tuple (trace_id, span_id, flags) and the caller unpacks three values. This misleads type checkers.

This PR fixes the annotation to tuple[int, int, int]. Annotation-only change, no runtime impact.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Annotation-only change; existing propagator/opentelemetry-propagator-jaeger tests cover the extraction behavior.

Does This PR Require a Contrib Repo Change?

  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated

…ator

The function returns a 3-tuple (trace_id, span_id, flags) on every code
path and callers unpack three values, but the annotation declared
tuple[int] (a one-element tuple), which misleads type checkers.
@Eason09053360
Eason09053360 marked this pull request as ready for review July 19, 2026 13:57
@Eason09053360
Eason09053360 requested a review from a team as a code owner July 19, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant