Skip to content

Conversation

@grcevski
Copy link
Contributor

The code when donated had support for experimental dynamic injection of the OTel Java SDK, since we didn't support Java TLS. This support didn't fully work, since some of the OTel SDK instrumentations don't work with dynamic injection. For example, gRPC never worked, because the interceptor is injected at build time, so OBI had to see the start of the Java process, which is not feasible.

I experimented recently with making various patches to the Java OTel SDK to support dynamic attach, and while I got things to work for gRPC and Netty, I was working on an old branch (2.14). After I attempted to migrate my code to the latest Java OTel SDK, I realised that many instrumentations that worked in my version don't work anymore, mainly because of refactoring in the Java OTel SDK to support java invoke dynamic (i.e. they call it indy). Many instrumentation have been modified to not pass data through locals, but through separate container classes which cannot be found by the application class loader. I attempted to fix this but I failed.

Since this is not a supported mode for the Java OTel SDK, and things have moved in the opposite direction, I'm removing our code for this here, but I'm keeping the injection classes, because we are going to use those to inject the OBI Java agent for TLS support.

@grcevski grcevski requested a review from a team as a code owner December 10, 2025 21:05
@grcevski
Copy link
Contributor Author

This work is prerequisite to finish the work on the OBI java agent.

@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

❌ Patch coverage is 33.33333% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.36%. Comparing base (b49b604) to head (3b58b2b).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
pkg/internal/otelsdk/sdk_inject.go 0.00% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #987      +/-   ##
==========================================
+ Coverage   56.28%   56.36%   +0.08%     
==========================================
  Files         255      255              
  Lines       22192    22136      -56     
==========================================
- Hits        12491    12478      -13     
+ Misses       8855     8812      -43     
  Partials      846      846              
Flag Coverage Δ
integration-test 22.98% <100.00%> (+0.08%) ⬆️
integration-test-arm 0.00% <0.00%> (ø)
integration-test-vm-${ARCH}-${KERNEL_VERSION} 0.00% <0.00%> (ø)
k8s-integration-test 2.69% <0.00%> (+0.01%) ⬆️
oats-test 0.00% <0.00%> (ø)
unittests 47.75% <0.00%> (+0.12%) ⬆️

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.

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.

2 participants