Skip to content

Conversation

zeitlinger
Copy link
Member

Fixes #7495

Alternative implementation that does not remove final from OpenTelemetrySdk

jsuereth and others added 30 commits July 18, 2025 10:11
- Create Entity/EntityBuilder class in internal package
- Update serialization code

Need to discuss how to work with Resource going forward.
- Remove ResourceWithEntity, no way to keep bincompat that way
- Update toString tests to be a lot more forgiving, but preserve intent
- fix reflective method lookup
- also add unit test in the right project.
- Creates an API matching EntityProvider OTEP
- Updates EntityDetector to be ResourceDetector
- Creates synchronous "update resource with this entity" method.
- Adds wiring for incubating API + incubating SDK

Note: Still have some thoughts and ideas about a formal API, this may still change.
- Remove `Entity` and only expose `EntityBuilder` similar to how we do `LogRecord`s.
- Have methods on `Resource` which determine if you're attaching the entity, simplify "remove" or just ignore for now.
…OpenTelemetry API.

- Update shared state in SDK to use Supplier<Resource> instead of Resource
- Add helper utils to expose private methods to supply the supplier
- Create new ExtendedOpenTelemetry* API/SDK and end-to-end test.
…internal/otlp/EntityRefMarshaler.java

Co-authored-by: jack-berg <[email protected]>
- Hide more methods (no incubating methods in public APIs that are not internal)
- Update builder API to use attributes directly
- Use static instances in Noop API
@zeitlinger zeitlinger requested a review from a team as a code owner July 18, 2025 08:17
@zeitlinger zeitlinger changed the title Extended opentelemetry alt Extended opentelemetry (alternative) Jul 18, 2025
@zeitlinger zeitlinger self-assigned this Jul 18, 2025
Copy link

codecov bot commented Jul 18, 2025

Codecov Report

Attention: Patch coverage is 85.71429% with 19 lines in your changes missing coverage. Please review.

Project coverage is 89.97%. Comparing base (80da2ab) to head (3d792ff).

Files with missing lines Patch % Lines
.../incubator/ObfuscatedExtendedOpenTelemetrySdk.java 79.54% 9 Missing ⚠️
...ion/incubator/ExtendedOpenTelemetrySdkBuilder.java 88.88% 5 Missing ⚠️
.../extension/incubator/ExtendedOpenTelemetrySdk.java 71.42% 2 Missing ⚠️
...ntelemetry/sdk/internal/shutdown/WithShutdown.java 0.00% 2 Missing ⚠️
...telemetry/api/incubator/ExtendedOpenTelemetry.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7500      +/-   ##
============================================
- Coverage     89.99%   89.97%   -0.03%     
- Complexity     7078     7104      +26     
============================================
  Files           803      808       +5     
  Lines         21405    21507     +102     
  Branches       2086     2087       +1     
============================================
+ Hits          19263    19350      +87     
- Misses         1479     1493      +14     
- Partials        663      664       +1     

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

@zeitlinger
Copy link
Member Author

@trask @jaydeluca @jack-berg I was able to come up with a variant of ExtendedOpenTelemetry that does not result in any API changes

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.

Add ExtendedOpenTelemetry
2 participants