Skip to content

[WIP] entities prototype#5620

Closed
dyladan wants to merge 21 commits intoopen-telemetry:mainfrom
dynatrace-oss-contrib:res-prototype-v2
Closed

[WIP] entities prototype#5620
dyladan wants to merge 21 commits intoopen-telemetry:mainfrom
dynatrace-oss-contrib:res-prototype-v2

Conversation

@dyladan
Copy link
Member

@dyladan dyladan commented Apr 18, 2025

Pulls in changes from the first prototype and applies them to the 2.0 SDK

TODO:

  • e2e tests
  • unit tests
  • add entity detectors (process/host probably a good start)
  • Make Entity a type/interface instead of a class because it is accessed from resource.entities
  • Export pipeline

Open questions:

  • Should detectors be able to detect resource attributes and entities, or just one or the other
  • verify entity merge override ordering because it's the opposite of the current resource impl

dyladan added 2 commits April 18, 2025 15:10
Pulls in changes from the first prototype and applies them to the 2.0 SDK

TODO: tests, entity detectors
@codecov
Copy link

codecov bot commented Apr 21, 2025

Codecov Report

❌ Patch coverage is 25.89286% with 83 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.27%. Comparing base (1c1dd01) to head (b82a1e7).
⚠️ Report is 143 commits behind head on main.

Files with missing lines Patch % Lines
...ackages/opentelemetry-resources/src/entity-impl.ts 9.45% 67 Missing ⚠️
...kages/opentelemetry-resources/src/resource-impl.ts 54.28% 16 Missing ⚠️

❌ Your patch check has failed because the patch coverage (25.89%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5620      +/-   ##
==========================================
- Coverage   95.17%   94.27%   -0.91%     
==========================================
  Files         316      317       +1     
  Lines        8521     8625     +104     
  Branches     1763     1789      +26     
==========================================
+ Hits         8110     8131      +21     
- Misses        411      494      +83     
Files with missing lines Coverage Δ
...l/packages/otlp-transformer/src/common/internal.ts 100.00% <100.00%> (ø)
...es/opentelemetry-resources/src/detect-resources.ts 78.57% <100.00%> (ø)
...kages/opentelemetry-resources/src/resource-impl.ts 85.71% <54.28%> (ø)
...ackages/opentelemetry-resources/src/entity-impl.ts 9.45% <9.45%> (ø)
🚀 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.

@github-actions
Copy link

github-actions bot commented Dec 1, 2025

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

- Add asyncAttributesPending and waitForAsyncAttributes to Entity type
- Implement forEntity in TracerProvider interface
- Implement forEntity in BasicTracerProvider to create provider with merged entity
- Implement forEntity in NoopTracerProvider (returns self)
- Implement forEntity in ProxyTracerProvider with entity property support
- Update all test mocks to include forEntity method
- Store MeterProviderOptions in _config field for forEntity implementation
- Implement forEntity to create new MeterProvider with entity added to resource
@pichlermarc
Copy link
Member

@dyladan I'll close this one in favor of #6357. Please re-open if you still need it around :)

@pichlermarc pichlermarc closed this Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants