-
Notifications
You must be signed in to change notification settings - Fork 832
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(sdk-node): add HostDetector
as default resource detector
#4566
Conversation
b6bb327
to
4180164
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #4566 +/- ##
==========================================
- Coverage 92.85% 92.84% -0.02%
==========================================
Files 328 328
Lines 9494 9494
Branches 2040 2040
==========================================
- Hits 8816 8815 -1
- Misses 678 679 +1
|
Fixes open-telemetry#4282 - Add `HostDetector` to the list of default resource detectors - Add test to make sure host and process values are being set by default - Update from deprecated `sdk.detectResources()` to `sdk.start()` on tests - Update from deprecated `SemanticResourceAttributes.SERVICE_NAME` to `SEMRESATTRS_SERVICE_NAME` on SDK file
4180164
to
f606a0a
Compare
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.
Nice. LGTM.
I'll wait for a day at least before merging to give others a chance to comment, and as I find my comfort zone with https://github.com/open-telemetry/opentelemetry-js/blob/main/CONTRIBUTING.md#general-merge-requirements
], | ||
}); | ||
sdk.detectResources(); | ||
sdk.start(); |
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.
This was solely to resolve a deprecation warning, right?
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.
right!
HostDetector
as default resource detectorHostDetector
as default resource detector
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.
Looks good, just one changelog nit. 🙂
Ah sorry about that - I broke lint when resolving the conflict 😞 |
Thank you both for the reviews! 😄 |
…-telemetry#4566) * feat(node-sdk): add `HostDetector` as default resource detector Fixes open-telemetry#4282 - Add `HostDetector` to the list of default resource detectors - Add test to make sure host and process values are being set by default - Update from deprecated `sdk.detectResources()` to `sdk.start()` on tests - Update from deprecated `SemanticResourceAttributes.SERVICE_NAME` to `SEMRESATTRS_SERVICE_NAME` on SDK file * Update experimental/CHANGELOG.md * fix lint remove extra lint causing lint error --------- Co-authored-by: Marc Pichler <[email protected]>
Which problem is this PR solving?
Host resources were not being set by default when initializing node SDK with
NodeSDK
.Fixes #4282
Short description of the changes
HostDetector
to the list of default resource detectorssdk.detectResources()
tosdk.start()
on testsSemanticResourceAttributes.SERVICE_NAME
toSEMRESATTRS_SERVICE_NAME
on SDK fileType of change
Please delete options that are not relevant.
How Has This Been Tested?
sdk.test.ts
Checklist: