Skip to content

Support id generator configuration#195

Open
petyosi wants to merge 1 commit intoevanderkoogh:mainfrom
pydantic:configure-id-generator
Open

Support id generator configuration#195
petyosi wants to merge 1 commit intoevanderkoogh:mainfrom
pydantic:configure-id-generator

Conversation

@petyosi
Copy link
Contributor

@petyosi petyosi commented May 1, 2025

This change allows the configuration of the span id/trace id generators. We're using ULIDs:

pydantic/logfire#783.

Discussion:
open-telemetry/opentelemetry-specification#1947 (comment)

This PR will mechanically clash with #194, because it's touching the same lines. I'm happy to help with the conflict resolution, it's a fairly simple one.

@evanderkoogh
Copy link
Owner

Hey @petyosi. Unfortunately the issue is a bit more complicated than just allowing the generation of a different traceID.

The thing that we would certainly need to implement is for an IDGenerator to specify if the traces generated by it are compatible with Trace Context level 2 Random Flag.

And we need to make sure we actually set the correct flag in the SpanContext.

The other thing I was wondering, especially with the ulids, are they compatible with the TraceContext headers? Or would we have to force people to use different Trace Propagation settings if they aren't using the built-in generators?

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.

2 participants