Skip to content

Fix format_trace_id and format_span_id docstrings #4570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mattyding
Copy link

Description

The two docstrings I updated are incorrect and confused me while implementing otel spec. Per other docs, it looks like trace ID and span ID are intended to be 16-bytes and 8-bytes, respectively. The behavior of the format method in Python as implemented is to create a length N hexstring, which corresponds to N/2 bytes of data.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • This change requires a documentation update

I originally found this docstring by linking from the Python SDK documentation here

How Has This Been Tested?

N/A - documentation fix

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@mattyding mattyding requested a review from a team as a code owner May 7, 2025 16:09
Copy link

linux-foundation-easycla bot commented May 7, 2025

CLA Signed


The committers listed above are authorized under a signed CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant