opentelemetry-js-contrib icon indicating copy to clipboard operation
opentelemetry-js-contrib copied to clipboard

refactor(detector-github): change implementation to DetectorSync interface

Open david-luna opened this issue 1 year ago • 2 comments

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 detectResources from @opentelemetry/resources package. Ref
  • it is unlikely to be used oustide the SDK or auto-instrumentations

Short description of the changes

  • change detect method to be sync

david-luna avatar Jul 12 '24 12:07 david-luna

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%> (ø)

... and 66 files with indirect coverage changes

codecov[bot] avatar Jul 12 '24 13:07 codecov[bot]

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.

github-actions[bot] avatar Jul 13 '24 06:07 github-actions[bot]

This issue was closed because no owner or sponsor has been found after 14 days

github-actions[bot] avatar Jul 30 '24 06:07 github-actions[bot]

I'll sponsor this.

pichlermarc avatar Jul 30 '24 11:07 pichlermarc

(changed the title to reflect that this is a breaking change :slightly_smiling_face:)

pichlermarc avatar Jul 30 '24 11:07 pichlermarc

@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

trentm avatar Jul 31 '24 00:07 trentm

@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

david-luna avatar Aug 01 '24 10:08 david-luna