Thanks to visit codestin.com
Credit goes to github.com

Skip to content

The implementation of Trace ID is incompatible with the spec #1991

Closed
@ymotongpoo

Description

@ymotongpoo

Describe your environment

  • OS: Linux (Debian 10)
  • Python: 3.9.2 (vanilla)

Steps to reproduce

  1. Read the spec of Trace ID
  2. Read the implementation of Trace ID in SpanContext

What is the expected behavior?
Trace ID in OpenTelemetry for Python is defined as "16-bytes bytes" which is following OpenTelemetry's spec

What is the actual behavior?
Trace ID is just defined as int and there is no validation for the length of the ID in the SpanContext constructor.

Additional context
If we make OpenTelemetry for Python follow the existing spec as-is, it may be braking changes for existing libraries including 1st party and 3rd parties.

Some other languages are validating the length of data:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions