Skip to content

TraceID is the same for all spans #3172

Closed
@ty-elastic

Description

@ty-elastic

Describe your environment

OS: python:3.12.6-slim-bookworm
Python version: python:3.12.6
SDK version: 0.50b0/1.29.0
API version: 0.50b0/1.29.0

What happened?

Create a simple zero-code Python app invoked with opentelemetry-instrument. Whether you use auto-instrumentation (here, a flask endpoint) or add manual instrumentation (@tracer.start_as_current_span), the Trace IDs created for subsequent traces are all the same when using version 0.50b0/1.29.0. Keeping everything else the same, using 0.49b2/1.28.2, Trace IDs are randomly generated.

Steps to Reproduce

See https://github.com/ty-elastic/otel-python-bug and observe Collector debug output varying the version of the python OTel libraries used.

Basically, create a simple python app and use zero-code instrumentation. Either use an auto-instrumented library (like flask) or manually create spans. Using 0.50b0/1.29.0, Trace ID doesn't change between traces; using 0.49b2/1.28.2 it does (as expected).

Expected Result

Trace ID is randomly generated.

Actual Result

Trace ID is the same for every trace.

Additional context

No response

Would you like to implement a fix?

No

Metadata

Metadata

Assignees

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