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

Remove semaphore acquire from span #189

Closed
wants to merge 1 commit into from

Conversation

endorama
Copy link
Member

@endorama endorama commented Dec 6, 2023

To compute more precise timing on the execution of HandleStream and allow monitoring semaphore operation using other instrumentation, move the span start in HandleStream after semaphore acquisition.

This prevents the context to be rewritten when passed to sem.Acquire.

@endorama endorama requested a review from a team as a code owner December 6, 2023 10:40
@endorama endorama enabled auto-merge (squash) December 6, 2023 14:52
Copy link
Member

@kruskall kruskall left a comment

Choose a reason for hiding this comment

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

I'd prefer to create a span inside semAcquire in apm-data and avoid passing a custom semaphore to enable tracing. This way support would be transparent just like we have tracing for the Stream method.
I'm also concerned about the above PR effect on APM server: we're not passing a custom semaphore there so that would create misleading traces (Stream would look really fast and any amount of time spent acquiring the lock would be lost)

@endorama endorama mentioned this pull request Dec 6, 2023
@endorama
Copy link
Member Author

endorama commented Dec 6, 2023

Closing this PR in favor of #190

@endorama endorama closed this Dec 6, 2023
auto-merge was automatically disabled December 6, 2023 16:31

Pull request was closed

@endorama endorama deleted the handle-stream-nosem branch December 6, 2023 16:33
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