Skip to content

Conversation

@jasonjkeller
Copy link
Contributor

Add a default value that forces the opentelemetry.sdk.autoconfigure.enabled config to be treated as a Boolean. Otherwise it was being treated as a String and causing a ClassCastException.

2025-08-08T14:20:27,682-0700 [70724 1] com.newrelic.agent.instrumentation.ClassTransformerServiceImpl FINEST: An error was thrown from instrumentation library com.newrelic.instrumentation.opentelemetry-sdk-extension-autoconfigure-1.28.0
java.lang.ClassCastException: class java.lang.String cannot be cast to class java.lang.Boolean (java.lang.String and java.lang.Boolean are in module java.base of loader 'bootstrap')

Add a default value that forces the `opentelemetry.sdk.autoconfigure.enabled` config to be treated as a `Boolean`. Otherwise it was being treated as a `String` and causing a `ClassCastException`.

```
2025-08-08T14:20:27,682-0700 [70724 1] com.newrelic.agent.instrumentation.ClassTransformerServiceImpl FINEST: An error was thrown from instrumentation library com.newrelic.instrumentation.opentelemetry-sdk-extension-autoconfigure-1.28.0
java.lang.ClassCastException: class java.lang.String cannot be cast to class java.lang.Boolean (java.lang.String and java.lang.Boolean are in module java.base of loader 'bootstrap')
```
@jasonjkeller jasonjkeller moved this from Triage to Needs Review in Java Engineering Board Aug 8, 2025
@jasonjkeller jasonjkeller changed the title Update AutoConfiguredOpenTelemetrySdk.java Fix AutoConfiguredOpenTelemetrySdk config Aug 8, 2025
@codecov-commenter
Copy link

codecov-commenter commented Aug 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.47%. Comparing base (f143ece) to head (8fe83b0).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2451      +/-   ##
============================================
- Coverage     70.47%   70.47%   -0.01%     
+ Complexity    10049    10048       -1     
============================================
  Files           845      845              
  Lines         40730    40730              
  Branches       6180     6180              
============================================
- Hits          28706    28703       -3     
- Misses         9237     9238       +1     
- Partials       2787     2789       +2     

☔ 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.

@kmudduluru kmudduluru added this to the [FY26Q2] Java agent KTLO milestone Aug 11, 2025
@Newrelic-Boomi
Copy link

@jasonjkeller jasonjkeller reopened this Aug 11, 2025
@github-project-automation github-project-automation bot moved this from Needs Review to Triage in Java Engineering Board Aug 11, 2025
@jasonjkeller jasonjkeller moved this from Triage to Needs Review in Java Engineering Board Aug 11, 2025
@jasonjkeller jasonjkeller merged commit 3361c19 into main Aug 11, 2025
1902 of 1945 checks passed
@jasonjkeller jasonjkeller deleted the fix-otel-autoconfig branch August 11, 2025 23:59
@kmudduluru kmudduluru moved this from Needs Review to Code Complete/Done in Java Engineering Board Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants