Skip to content

[DRAFT] Entity SDK prototype#8464

Open
jsuereth wants to merge 4 commits into
open-telemetry:mainfrom
jsuereth:wip-entity-sdk-for-reals
Open

[DRAFT] Entity SDK prototype#8464
jsuereth wants to merge 4 commits into
open-telemetry:mainfrom
jsuereth:wip-entity-sdk-for-reals

Conversation

@jsuereth

@jsuereth jsuereth commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

This is a more up-to-date PR accounting for changes from OpenTelemetry Configuraiton work for Entities.

What this does:

  • Implements Entity necessary components in core SDK, hidden in internal as much as feasible (this needs @open-telemetry/java-maintainers feedback on some of the challenges here)
  • Creates "public facing" SDK interface in sdk-extensions/incubating
  • Attempts to write in feature flag to turn on Entity capabilities.

A few issues though:

  • We want ResourceDetection to upgrade to use entities going forward. I have lots of questions for configuration I'll need to discuss with those folks and @jack-berg w/ Entities SIG to see a path forward here
  • Resource is exposed in the SDK as an autovalue - which has compatibility limitations. I"m not sure how to keep the auto API compat bot happy here as effectively you can't subclass this without breaking Java's visibiltiy rules, but also it appears like it can be subclassed if you do bytecode rewritting so it technically is a bincompat change.
  • The way I'm supporting Config is prretty bogus. I tried to keep it isolated but I'm not happy with it. Additionally the ResourceFactory code at some point is only keeping attributes for Resource - which is hugely problematic for Entity. I'd like to refactor the whole kit and kaboodle but I know stabilizaiton is coming

- Create new Entity Detectors that are completely separate from existing
  reosurce detectors so entity must be FULL opt-in before behavior
  changes, even if OTLP is non-breaking.
- Wire "either/or" scenarios into resource factory and declarative
  config.

TODOs we need to sort out:

- Features of ResourceConfiguration spec that interact poorly with
  entities, e.g. attribute-specific filters that aren't entity aware,
  raw attribute definitions.
- Adding `env` as a supported detector for reading in Entity env
  variable propagation.
- Dealing with oddities of ResourceBuilder/Factory wanting to only use
  attributes in Java - we worked around it for now.
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.

1 participant