Skip to content
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

Make UUID generation lazy #2826

Closed
wants to merge 1 commit into from
Closed

Make UUID generation lazy #2826

wants to merge 1 commit into from

Conversation

sl0thentr0py
Copy link
Member

@sl0thentr0py sl0thentr0py commented Mar 15, 2024

same as #2131

for #2827

@sl0thentr0py
Copy link
Member Author

note that we also have uuid generation on scope.propagation_context now and to make that lazy we first need to encapsulate propagation_context in a class and not just a raw dict as currently implemented.

def _create_new_propagation_context(self):
# type: () -> Dict[str, Any]
return {
"trace_id": uuid.uuid4().hex,
"span_id": uuid.uuid4().hex[16:],
"parent_span_id": None,
"dynamic_sampling_context": None,
}

Without also making those lazy, this will not really have a performance impact but we can merge it anyway.

@anonrig
Copy link

anonrig commented Apr 10, 2024

Is there a reason to not land this pull request right now?

@sl0thentr0py
Copy link
Member Author

we can merge but without the prop context changes it won't have full impact, and that might conflict with the v2 refactor, I will let @sentrivana and @antonpirker decide

@antonpirker
Copy link
Member

I will refactor the propagation context first and then merge this change

@antonpirker
Copy link
Member

This has found its way into the codebase with the refactoring of the propagation context: #2970

@antonpirker antonpirker closed this Jun 6, 2024
@sl0thentr0py sl0thentr0py deleted the neel/uuid-lazy branch August 26, 2024 12:39
@filips123
Copy link

UUIDs in tracing.py are still always generated, as #2970 only made the generation lazy for propagation contexts. Is this intentional?

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.

4 participants