opentelemetry-java icon indicating copy to clipboard operation
opentelemetry-java copied to clipboard

EntityProvider prototype

Open breedx-splk opened this issue 7 months ago • 2 comments

Here's an initial straw-man implementation in java of the EntityProvider described in otep-4316.

My first impressions are that the implementation itself is pretty basic and open to future tweaking/improvements (it's really just supposed to be a caching thread-safe CRUD bucket), but the interesting and more complicated stuff begins to happen when the EntityProvider is integrated with or otherwise used by other places in the code.

Right now, it is wired up into the SdkTracerProvider and has exposed builder methods on the SdkTracerProviderBuilder. I think there are bound to be breaking changes in that, so please feel free to call those out. Right now, there's also no way for users or instrumentations to get any handle to the "live" EntityProvider in order to add/update/delete any entities...it would have to be wired up entirely by the user and retained.

I also did not yet attempt to wire it up metrics or logs, because I figured there would be enough to talk about first with traces. :)

breedx-splk avatar May 21 '25 00:05 breedx-splk

Codecov Report

Attention: Patch coverage is 93.40659% with 6 lines in your changes missing coverage. Please review.

Project coverage is 89.85%. Comparing base (cc7d085) to head (f279641).

Files with missing lines Patch % Lines
...ntelemetry/sdk/trace/SdkTracerProviderBuilder.java 50.00% 5 Missing :warning:
.../opentelemetry/sdk/entities/SdkEntityProvider.java 98.48% 0 Missing and 1 partial :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7360      +/-   ##
============================================
- Coverage     89.87%   89.85%   -0.02%     
- Complexity     6899     6921      +22     
============================================
  Files           786      789       +3     
  Lines         20793    20877      +84     
  Branches       2026     2034       +8     
============================================
+ Hits          18687    18760      +73     
- Misses         1465     1473       +8     
- Partials        641      644       +3     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar May 21 '25 05:05 codecov[bot]

FYI - I rebooted the underlying Entities PR which includes OTLP1.7 support - https://github.com/open-telemetry/opentelemetry-java/pull/7434

jsuereth avatar Jun 20 '25 02:06 jsuereth