-
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: Add package for automatic propagator configuration #2299
feat: Add package for automatic propagator configuration #2299
Conversation
4e85656
to
ea5a212
Compare
…gator configuration
ea5a212
to
7f4ebb2
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2299 +/- ##
==========================================
- Coverage 90.97% 90.40% -0.58%
==========================================
Files 146 149 +3
Lines 7492 7367 -125
Branches 1502 1530 +28
==========================================
- Hits 6816 6660 -156
- Misses 676 707 +31
|
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 picking this up. Some nits but overall looks good.
You can add me as a code-owner to the component-owners file. 🙂
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.
Ah there's also one other thing we need to to do make auto-labelling of PRs work: we need to add its path to .github/component-label-map.yml
.
cc @trentm @JamieDanielson since you reviewed my original PR #2232 |
Is the intention that |
The intention is to make the
Exactly. People would have to add it manually to either the Having it seperate will allow us to move the thrid-party propagator packages (xray, xray-lambda) back to contrib and will allow the lambda layer to avoid |
Looks to me like the build failure is unrelated to this change. |
Actually it is related to the (large, possibly accidental) "package-lock.json" update in this PR. Currently it includes this diff hunk: "node_modules/@types/scheduler": {
- "version": "0.16.8",
- "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz",
- "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==",
+ "version": "0.23.0",
+ "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.23.0.tgz",
+ "integrity": "sha512-YIoDCTH3Af6XM5VuwGG/QL/CJqga1Zm3NkU3HZ4ZHK2fRMPYP1VczsTUqtsf43PH/iJNVlPHAo2oWX7BSdB2Hw==",
"dev": true
}, That is a transitive dep from here:
On main this is currently:
So, something about the steps of Options
I think option 3 is the most appropriate for this PR. I'll attempt to push that to this feature branch. |
Aside: package-lock.json maint/updates are a royal PITA. |
@trentm Thanks for looking into this. I was just working on it myself and was coming to the same conclusion. I think what happened is the PR had a merge conflict in the package-lock.json file, and I tried resolving it by deleting it and doing npm install. |
For the record this is what I did in the working copy:
And, IIRC, this generates a much smaller change than doing: |
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
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.
Since our function is getPropagator
(single) and it returns a CompositePropagator
or a single propagator, I'm wondering if the package should actually be called auto-configuration-propagator
(singular instead of plural)? I also thought about going the other way with this being getPropagators
to match getResourceDetectors...
.
I don't feel strongly about this, just an observation on the second look. Otherwise though this looks great, thanks for working on this.
On the plural/singular:
There is no "all singular" or "all plural" naming option here, so ... I think it is fine as is. And that we should merge and march on. :) (I wonder if this package will be somewhat short-lived, if a more general auto-configuration handling package is written that handles file-config and/or other |
Agreed! 🚀 Naming is hard. |
Which problem is this PR solving?
Follow-up to #2232
Related to open-telemetry/opentelemetry-js#4494.
The spec says that the lambda instrumentation should be configurable via the
OTEL_PROPAGATORS
env variable, which MUST include thexray-lambda
propagator.The spec also says that third-party propagators MUST NOT be maintained as part of the core SDK.
Short description of the changes
This PR introduces new package that combines all known propagators configurable via the
OTEL_PROPAGATORS
env variable. It exposes agetPropagator()
function that returns a propagators instance based on what is provided in the env variable.