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

Fix wrong reported program type and missing traces #552

Merged
merged 4 commits into from
Jan 17, 2024

Conversation

grcevski
Copy link
Contributor

When we were re-using the process tracers we weren't setting the program type on the service id. It would only be seen by duplicated executables, which we have plenty of in multi-exec. I also found that we weren't pinning certain maps which held the information on currently processed traces, so depending on which kernel program ran we might miss some trace events. I also fixed some prints which were on when debug was disabled.

Closes #532

@grcevski grcevski requested a review from mariomac as a code owner January 16, 2024 21:48
@@ -130,7 +131,7 @@ static __always_inline u8 correlated_requests(tp_info_pid_t *tp, tp_info_pid_t *
// We check for correlated requests which are in order, but from different PIDs
// Same PID means that we had client port reuse, which might falsely match prior
// transaction if it happened during the same epoch.
if ((tp->tp.ts > existing_tp->tp.ts) && (tp->pid != existing_tp->pid)) {
if ((tp->tp.ts >= existing_tp->tp.ts) && (tp->pid != existing_tp->pid)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These could be the same if the requests are too quick to happen one after another.

@codecov-commenter
Copy link

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (6925666) 79.32% compared to head (4454e68) 45.04%.

Files Patch % Lines
pkg/internal/export/debug/debug.go 0.00% 2 Missing ⚠️
pkg/internal/discover/attacher.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #552       +/-   ##
===========================================
- Coverage   79.32%   45.04%   -34.28%     
===========================================
  Files          69       67        -2     
  Lines        5828     5652      -176     
===========================================
- Hits         4623     2546     -2077     
- Misses        984     2955     +1971     
+ Partials      221      151       -70     
Flag Coverage Δ
integration-test ?
unittests 45.04% <0.00%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@mariomac mariomac left a comment

Choose a reason for hiding this comment

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

🙌🏻

@grcevski grcevski merged commit 4dc761c into grafana:main Jan 17, 2024
4 checks passed
@grcevski grcevski deleted the wrong_prog_type branch January 17, 2024 12:42
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.

Python application sometimes recognized as Go application
3 participants