opentelemetry-js-contrib
opentelemetry-js-contrib copied to clipboard
refactor(detector-github): change implementation to DetectorSync interface
Context
Another PR moving away from the deprecated Detector interface in order to prepare the codebase for a fix for #2320. this time is for GitHub detector.
Not doing all detectors at once:
- detectors are independent from each other
- smaller PRs for faster reviews
- other detectors have a similar approach on exceptions like the described in #2328
My reasons to categorize it as a refactor are:
- SDK handles both interfaces using
detectResourcesfrom@opentelemetry/resourcespackage. Ref - it is unlikely to be used oustide the SDK or auto-instrumentations
Short description of the changes
- change
detectmethod to be sync
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 90.40%. Comparing base (
dfb2dff) to head (ddbe8bf). Report is 198 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #2336 +/- ##
==========================================
- Coverage 90.97% 90.40% -0.58%
==========================================
Files 146 149 +3
Lines 7492 7359 -133
Branches 1502 1527 +25
==========================================
- Hits 6816 6653 -163
- Misses 676 706 +30
| Files | Coverage Δ | |
|---|---|---|
| ...ce-detector-github/src/detectors/GitHubDetector.ts | 100.00% <100.00%> (ø) |
This package does not have an assigned component owner and is considered unmaintained. As such this package is in feature-freeze and this PR will be closed with 14 days unless a new owner or a sponsor (a member of @open-telemetry/javascript-approvers) for the feature is found. It is the responsibility of the author to find a sponsor for this feature. Are you familiar with this package? Consider becoming a component owner.
This issue was closed because no owner or sponsor has been found after 14 days
I'll sponsor this.
(changed the title to reflect that this is a breaking change :slightly_smiling_face:)
@pichlermarc FYI: David was going to bring up some Qs regarding all the Detector -> DetectorSync PRs in the JS SIG tomorrow. There is some more discussion on https://github.com/open-telemetry/opentelemetry-js-contrib/pull/2328
@pichlermarc FYI: David was going to bring up some Qs regarding all the Detector -> DetectorSync PRs in the JS SIG tomorrow. There is some more discussion on #2328
For the record the SIG we agreed to break for non stable detectors like this one. So I'm merging this one when I can