Skip to content

Fix Java TLS bugs#1372

Merged
grcevski merged 1 commit into
open-telemetry:mainfrom
grcevski:fix_java_tls
Feb 26, 2026
Merged

Fix Java TLS bugs#1372
grcevski merged 1 commit into
open-telemetry:mainfrom
grcevski:fix_java_tls

Conversation

@grcevski
Copy link
Copy Markdown
Contributor

@grcevski grcevski commented Feb 26, 2026

This PR fixes two separate issues related to Java TLS with MySQL. The problem is intermittent and depends on the payload, but it can be exposed with this DEMO application https://github.com/fstab/2026-grafana-and-friends-meetup.

Essentially, we had two issues:

  1. The Java TLS code didn't mark the connection as active ssl connection. This can cause problems with the accumulation of buffers in the mysql BPF detector. We would see proper traffic, but later the encrypted traffic would follow and we'd tack it on. We'd also be parsing TLS buffers that make no sense.
  2. Some parts of the MySQL protocol were identified as HTTP2 settings frame. When I wrote the HTTP2 code in the generic tracer initially we had no backup userspace path for HTTP2 detection, so I added code to detect the settings frame as well as the HTTP2 preamble. The problem is that random other protocol bytes can look like a settings frame, in this case MySQL and randomly some SQL statements will not show. Since we have the userspace backup path now, this is not needed anymore and it will also eliminate the false positives.

@grcevski grcevski requested a review from a team as a code owner February 26, 2026 17:17
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 26, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1372      +/-   ##
==========================================
+ Coverage   43.11%   43.69%   +0.57%     
==========================================
  Files         311      311              
  Lines       33851    33851              
==========================================
+ Hits        14594    14790     +196     
+ Misses      18317    18112     -205     
- Partials      940      949       +9     
Flag Coverage Δ
integration-test 21.58% <ø> (+0.04%) ⬆️
integration-test-arm 0.00% <ø> (ø)
integration-test-vm-x86_64-5.15.152 0.00% <ø> (ø)
integration-test-vm-x86_64-6.10.6 0.00% <ø> (ø)
k8s-integration-test 2.30% <ø> (+2.30%) ⬆️
oats-test 0.00% <ø> (ø)
unittests 44.55% <ø> (-0.01%) ⬇️

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.

@grcevski grcevski merged commit 55f2804 into open-telemetry:main Feb 26, 2026
78 of 79 checks passed
@grcevski grcevski deleted the fix_java_tls branch February 26, 2026 18:22
NimrodAvni78 pushed a commit to coralogix/opentelemetry-ebpf-instrumentation that referenced this pull request Mar 1, 2026
@MrAlias MrAlias added this to the v0.6.0 milestone Mar 2, 2026
@MrAlias MrAlias mentioned this pull request Mar 5, 2026
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.

3 participants