-
Notifications
You must be signed in to change notification settings - Fork 912
feat(opentelemetry-resources): add schema url #5753
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
base: main
Are you sure you want to change the base?
Conversation
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.
thank you for working on this 🙂
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5753 +/- ##
==========================================
+ Coverage 95.01% 95.04% +0.02%
==========================================
Files 303 303
Lines 7946 7984 +38
Branches 1607 1617 +10
==========================================
+ Hits 7550 7588 +38
Misses 396 396
🚀 New features to boost your workflow:
|
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.
thanks for addressing the comments, overall this looks good already - just one small blocker left 🙂
Looks like most things are resolved here. After another round of reviews I think this can merge. |
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
|
||
if (url.protocol !== 'http:' && url.protocol !== 'https:') { | ||
diag.warn( | ||
'Invalid schema URL format: "%s". Schema URL must be a valid URI with http:// or https://. Schema URL will be ignored.', |
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.
nit: string used twice can be a constant
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.
addressed in 5190bcc
Which problem is this PR solving?
Resolves #4182
Short description of the changes
The JavaScript SDK, unlike most others, currently does not give the ability to provide a Schema URL to a resource. See: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/sdk.md#resource-creation
This PR implements the ability to provide it.
There was a previous attempt at this by another contributor, which was closed: #5070
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
npm run test
Checklist: