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

Question regarding changing the handler method in net/http #1966

Open
ananthcodekarma opened this issue Mar 10, 2025 · 0 comments
Open

Question regarding changing the handler method in net/http #1966

ananthcodekarma opened this issue Mar 10, 2025 · 0 comments

Comments

@ananthcodekarma
Copy link

i see that in commit 4a90d19, the uprobe for the net/http server has been moved from

SEC("uprobe/HandlerFunc_ServeHTTP")

to

to SEC("uprobe/serverHandler_ServeHTTP")

I can see that the request parameters such as HTTPMethod, Path etc. was pushed into the spancontext at method entry before and after the change they have been moved to methodExit.

I understand that serverHandler_ServeHTTP gets invoked first, then the mux gets invoked and then uprobe/HandlerFunc_ServeHTTP gets invoked.

Is the change to move the execution to an even more outer level so that the span measurements can be more accurate or is there any other reason for it..

Any clear reason for the change will be helpful.

@RonFed - Tagging as Ron made the change.

PR - https://github.com/open-telemetry/opentelemetry-go-instrumentation/pull/868/commits
Commit Id - 4a90d19

Thanks,
Ananth

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

No branches or pull requests

1 participant