-
Notifications
You must be signed in to change notification settings - Fork 810
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
decide on advice for use of *unstable* semconv consts: copy or pin dep #5182
Comments
There is a possibly interesting wrinkle here is the usage of Take this usage, for discussion: opentelemetry-js/packages/opentelemetry-resources/src/detectors/platform/node/ProcessDetectorSync.ts Lines 18 to 28 in d8bc6b2
When doing a semconv package release, current practice in this repo is to update the semconv dep in any other core-repo package to the new semconv package version (pinned). E.g. from this release PR: https://github.com/open-telemetry/opentelemetry-js/pull/5186/files#diff-b12e80a906ecf0de3d9311ef632ab16939846c61c08935857023a117cc3ff910 diff --git a/packages/opentelemetry-resources/package.json b/packages/opentelemetry-resources/package.json
index 6c14650825..79b1796eca 100644
--- a/packages/opentelemetry-resources/package.json
+++ b/packages/opentelemetry-resources/package.json
@@ -92,7 +92,7 @@
},
"dependencies": {
"@opentelemetry/core": "1.28.0",
- "@opentelemetry/semantic-conventions": "1.27.0"
+ "@opentelemetry/semantic-conventions": "1.28.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources",
"sideEffects": false Currently there is no problem here. However, soonish we'll want to update the deprecated export name usage, e.g. updating from Note how, on line 28 of that diff, we have changed to use the "incubating" entry-point of the semconv package. Then, the possible issue is that the newer version of Then, the question is:
|
#5187 is a draft PR that shows both options, using the "resources" package as a demo. |
When a key is removed it should be moved to the |
Then why do the semconv incubating packages/entry-points (for JS, Java, etc.) state that the incubating package can have breaking changes in minor versions? Are you positive that some experimental semconv keys don't just get removed rather than moved to "deprecated.yml"? |
I briefly tried to find a counter example (i.e. a breaking change going from 1.27.0 to 1.28.0) and could not find one. Do you happen to know if the JS semconv package is different from the other langs in someway that we don't have breaking changes in "incubating"? Perhaps the other langs don't emit deprecated keys? So I wonder if it is fine for us to remove the mention here of the incubating entry-point having breaking changes and users needed to beware how they use it. |
Some languages do not emit deprecated keys. At least go used to be like that. |
A side-effect of pinning in the contrib repo: open-telemetry/opentelemetry-js-contrib#2473 pinned the semconv dep for instrumentation-pg "as it's using the incubating entrypoint, which may break on minor bumps." ... as it should fail, because: it fails because the dep is pinned, presumably because incubating is being used, which could have a breaking change. So, in general, it requires a manual look to check for those breaking changes. We'll need to change the "update otel deps" process somehow to accommodate this. I'll look into it. |
Maintainers discussed this earlier today. My notes:
Some examples of breaking changes in the incubating entry-point we've seen or expect:
-export const DB_COSMOSDB_OPERATION_TYPE_VALUE_EXECUTE = "Execute" as const;
+export const DB_COSMOSDB_OPERATION_TYPE_VALUE_EXECUTE = "execute" as const;
-export const DB_COSMOSDB_OPERATION_TYPE_VALUE_EXECUTE_JAVASCRIPT = "ExecuteJavaScript" as const;
+export const DB_COSMOSDB_OPERATION_TYPE_VALUE_EXECUTE_JAVASCRIPT = "execute_javascript" as const;
|
This adds a lint step that checks that packages in the workspace are following our 'rule' that uses of the semconv pkg 'incubating' entry-point should *pin* the '@opentelemetry/semantic-conventions' dep. This is because (though rare) the incubating/unstable semconv exports can have breaking changes in minors. Refs: open-telemetry#2549 (comment) Refs: open-telemetry/opentelemetry-js#5182
open-telemetry/opentelemetry-js-contrib#2569 adds a 'npm run lint' step to ensure the semconv dep is pinned if a package is using the incubating entry-point (only usage in "src/**/*.ts" is checked). |
[Trent]
[Jamie]
Thinking through this more... while it may not be a big deal for someone to pin now when only http is stable, it will become a bigger issue when the next wave of stable attributes come through (if there are changes). This would mean folks have the option to either pin and miss out on new stable attributes, or unpin and risk breaking changes. I'm leaning even more heavily now toward copying attributes, but am fine with that as a follow-up.
Originally posted by @JamieDanielson in #5166 (comment)
The text was updated successfully, but these errors were encountered: