Skip to content

Conversation

@grcevski
Copy link
Contributor

Right now our protocol control logic looks for pieces of the buffer to identify whether something is HTTP, HTTP2, MySQL or Postgres. However, we can possibly have the situation where the first packet that came through identified a protocol, say HTTP, but then the new part of the packet somehow based on the contents looks like something else.

This PR ensures we skip other protocol detectors once we've identified that something is HTTP.

@grcevski grcevski requested a review from a team as a code owner October 30, 2025 13:17
@codecov
Copy link

codecov bot commented Oct 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.42%. Comparing base (df1d5ae) to head (ee2fc00).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #832       +/-   ##
===========================================
+ Coverage   25.84%   55.42%   +29.57%     
===========================================
  Files         214      251       +37     
  Lines       19339    21400     +2061     
===========================================
+ Hits         4999    11861     +6862     
+ Misses      13774     8731     -5043     
- Partials      566      808      +242     
Flag Coverage Δ
integration-test 23.26% <ø> (ø)
integration-test-arm 0.00% <ø> (ø)
integration-test-vm-${ARCH}-${KERNEL_VERSION} 0.00% <ø> (ø)
k8s-integration-test 2.77% <ø> (ø)
oats-test 0.00% <ø> (ø)
unittests 46.53% <ø> (?)

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mmat11
Copy link
Contributor

mmat11 commented Oct 30, 2025

there's already some infrastructure in place for storing protocol info, see call_protocol_args_t->protocol_type or enum protocol_type
if we extend that enum to http/http2, the checks for other tcp protocols are already in place, see: https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/blob/main/bpf/generictracer/protocol_mysql.h#L205-L208

@grcevski
Copy link
Contributor Author

I hit a failure on a test and I can see the problem, we delayed a request but there was nothing to push it to completion. I'm going to work on a PR to fix this.

@grcevski grcevski merged commit 2790223 into open-telemetry:main Oct 30, 2025
61 of 62 checks passed
@grcevski grcevski deleted the verify_already_started_http branch October 30, 2025 21:57
@MrAlias MrAlias added this to the v0.2.0 milestone Nov 3, 2025
@MrAlias MrAlias mentioned this pull request Nov 3, 2025
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.

4 participants