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

Don't track outgoing span contexts with the context map #873

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

RonFed
Copy link
Contributor

@RonFed RonFed commented Jun 8, 2024

The start_tracking_span and stop_tracking_span functions are used for in-process context propagation, hence there is no need to call them on outgoing spans.

@RonFed RonFed requested a review from a team as a code owner June 8, 2024 13:12
@RonFed RonFed changed the title Don't track outgoing spans context Don't track outgoing span contexts with the context map Jun 8, 2024
@RonFed RonFed marked this pull request as draft June 8, 2024 14:18
Copy link
Contributor

@grcevski grcevski left a comment

Choose a reason for hiding this comment

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

LGTM! Nice performance fix!

@RonFed
Copy link
Contributor Author

RonFed commented Jun 13, 2024

This is still in draft because I'm not sure about the gRPC client probe which is outgoing but makes use of the start_tracking_span in a confusing way. It is needed there to correlate between the different probes using the context.

@MrAlias
Copy link
Contributor

MrAlias commented Jun 18, 2024

This is still in draft because I'm not sure about the gRPC client probe which is outgoing but makes use of the start_tracking_span in a confusing way. It is needed there to correlate between the different probes using the context.

Does this mean we are lacking testing for a particular case?

@RonFed RonFed marked this pull request as ready for review June 19, 2024 12:16
@RonFed
Copy link
Contributor Author

RonFed commented Jun 19, 2024

Does this mean we are lacking testing for a particular case?

No, I meant that the use of start_tracking_span and stop_tracking_span looks redundant in the gRPC client probe since it deals with an outgoing span, and these functions are meant for in-process context propagation. However, it is required in the gRPC case because of the way the instrumentation is written: the http2Client_NewStream probe needs to be correlated with the ClientConn_Invoke probe, and this is done with contexts.
I added a comment about this, and about the stop_tracking_span function being a no-op in case the passed span is not tracked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants