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

Pick up trace context from run labels #16346

Merged
merged 5 commits into from
Dec 12, 2024
Merged

Pick up trace context from run labels #16346

merged 5 commits into from
Dec 12, 2024

Conversation

bunchesofdonald
Copy link
Contributor

This updates the RunTelemetry class to pull the traceparent from the runs labels. A traceparent can be added to these labels by server-side code. For instance if a run is Late when we transition to Late the server will start a span and store the traceparent in the flow run's labels. This way when the flow run is later picked up by a worker this "Late" span becomes the root span for the trace.

Related to CLOUD-732

Copy link

codspeed-hq bot commented Dec 11, 2024

CodSpeed Performance Report

Merging #16346 will not alter performance

Comparing CLOUD-732 (74a7a2a) with main (e791f82)

Summary

✅ 3 untouched benchmarks

@jeanluciano
Copy link
Contributor

LGTM!!

@bunchesofdonald bunchesofdonald changed the title Pick up trace context from flow run labels Pick up trace context from run labels Dec 11, 2024
Copy link
Collaborator

@zzstoatzz zzstoatzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! just a couple nits related to #16292 as well as the type completeness check

src/prefect/telemetry/run_telemetry.py Outdated Show resolved Hide resolved
src/prefect/telemetry/run_telemetry.py Outdated Show resolved Hide resolved
src/prefect/telemetry/run_telemetry.py Outdated Show resolved Hide resolved
Base automatically changed from jean/cloud-740-update-flow-run-instrumentation-to-use-runtelemetry-class to main December 12, 2024 16:52
Copy link
Collaborator

@zzstoatzz zzstoatzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bunchesofdonald bunchesofdonald merged commit 3abe9d0 into main Dec 12, 2024
37 checks passed
@bunchesofdonald bunchesofdonald deleted the CLOUD-732 branch December 12, 2024 21:18
EmilRex pushed a commit that referenced this pull request Dec 13, 2024
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.

3 participants