Skip to content

Remove leaf_customer_span_id baggage re-parenting hack from tracing#46085

Open
needuv wants to merge 2 commits intoagentserver/invoke-reponsesfrom
needuv/remove-leaf-customer-span-id
Open

Remove leaf_customer_span_id baggage re-parenting hack from tracing#46085
needuv wants to merge 2 commits intoagentserver/invoke-reponsesfrom
needuv/remove-leaf-customer-span-id

Conversation

@needuv
Copy link
Copy Markdown
Member

@needuv needuv commented Apr 2, 2026

Use standard OTel traceparent propagation instead of overriding the parent span ID via the baggage header's leaf_customer_span_id key.

  • Remove _parse_baggage_key() and _override_parent_span_id() helpers
  • Remove baggage_header parameter from span/start_span/_extract_context
  • Simplify _prepare_request_span_args to return 3-tuple (no baggage)
  • Remove associated tests (TestParseBaggageKey, test_baggage_leaf_customer_span_id)
  • Preserve set_baggage/detach_baggage OTel context API (unrelated)

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Use standard OTel traceparent propagation instead of overriding the
parent span ID via the baggage header's leaf_customer_span_id key.

- Remove _parse_baggage_key() and _override_parent_span_id() helpers
- Remove baggage_header parameter from span/start_span/_extract_context
- Simplify _prepare_request_span_args to return 3-tuple (no baggage)
- Remove associated tests (TestParseBaggageKey, test_baggage_leaf_customer_span_id)
- Preserve set_baggage/detach_baggage OTel context API (unrelated)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@needuv needuv requested review from JC-386 and lusu-msft as code owners April 2, 2026 15:26
@github-actions github-actions bot added the Hosted Agents sdk/agentserver/* label Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Hosted Agents sdk/agentserver/*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant