-
Notifications
You must be signed in to change notification settings - Fork 539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(detector-instana)!: change implementation to DetectorSync interface #2337
feat(detector-instana)!: change implementation to DetectorSync interface #2337
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2337 +/- ##
==========================================
- Coverage 90.97% 90.68% -0.30%
==========================================
Files 146 156 +10
Lines 7492 7632 +140
Branches 1502 1575 +73
==========================================
+ Hits 6816 6921 +105
- Misses 676 711 +35
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I wonder if we should still mark it as breaking just in case.
detectors/node/opentelemetry-resource-detector-instana/src/detectors/InstanaAgentDetector.ts
Show resolved
Hide resolved
...ctors/node/opentelemetry-resource-detector-instana/test/InstanaAgentDetectorUnitTest.test.ts
Outdated
Show resolved
Hide resolved
…stanaAgentDetectorUnitTest.test.ts Co-authored-by: Amir Blum <[email protected]>
@basti1302 @kirrg001 is it okay for you to have this breaking change? If not we I can instead add a new detector implementing the sync interface |
Hi David, I do no longer work for IBM/Instana, so I don't have any particular opinion about this. |
Thanks @basti1302. Then we will go for the breaking change |
As discussed in the last SIG and documented on the PR, it is very unlikely that people out there are calling the Since the package is still experimental (major version 0), we can make this change as breaking. @open-telemetry/javascript-approvers any objections before I merge this PR? |
I'm mainly waiting for someone from Instana to comment. Maybe we give it a couple more days until we merge this to ensure they have had enough time to comment. |
@kirrg001 can you please take a look? |
@kirrg001 did you have the chance to look at this PR? |
Context
Another PR moving away from the deprecated
Detector
interface in order to prepare the codebase for a fix for #2320. This time is forInstana
detector.My reasons to categorize it as a refactor are:
detectResources
from@opentelemetry/resources
package. RefShort description of the changes
detect
method to be syncTest changes
Previously the test where expecting the detector to throw but with the new implementation is not possible throw in a synchornous
detect
method when an async HTTP request fails. The behaviour has been changed to return an empty resource instead. This change is compatible with the current SDK since it actually does the same logic when a detector fails. You can check thedetectResources
implementation link above.