-
Notifications
You must be signed in to change notification settings - Fork 102
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
The ctx
position in return probe might be incorrect
#1581
Comments
This is working for versions of Go > 1.17 where the context is not used to get a consistent eBPF map key. |
Verified this is incorrect. TestUpdate the database end-to-end test to use Go < 1.17 (see #1771 also)
Run the test: The output will be missing the database spans:
Change the arg position:
Re-run the end-to-end test and the expected spans are now exported. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue has already been mentioned in Slack, and it is posted here to track progress.
In the database/sql instrumentation, I found two pieces of code:
https://github.com/open-telemetry/opentelemetry-go-instrumentation/blob/e6f3f3cab8[…]2/internal/pkg/instrumentation/bpf/database/sql/bpf/probe.bpf.c
https://github.com/open-telemetry/opentelemetry-go-instrumentation/blob/e6f3f3cab8[…]2/internal/pkg/instrumentation/bpf/database/sql/bpf/probe.bpf.c
In the entry probe, the context_pos is 2, but in the return probe the context_pos is 3? I suppose the position in the return probe is also 2?
Although I believe there is an error of ctx pos, currently the functionality is still working properly.
The text was updated successfully, but these errors were encountered: