-
Notifications
You must be signed in to change notification settings - Fork 820
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). |
On the other hand, other language's dependency systems don't have the tendency to become the heaviest object in the known universeObviously those notes seem very abridged but I'm not sure if the bloat implications of this approach have been sufficiently considered. In fact, taking an average install of
Multiple semantic conventions packages is already half of the disk space after installing a reasonably usable otel setup In fact I think we can already estimate the effects of pinning by looking at another package that is well known to have issues with how many times it gets installed,
That is 16 installs of At some point the package size will probably decrease after all the past attempts for export key format can be cleaned up, and while the runtime hit isn't exactly equal to the size on disk, each duplicate still means resolving the package, loading the files, parsing the files, executing them, and then eventually cleaning up extraneous stuff from memory. Not a good look for a performance monitoring library to do it 16 times just because
I don't think you can expect any sort of being up to date from any wider circle than repos under otel. Looking at most users of semantic conventions:
So I would rather support copying/hard-coding the attributes until they're stable in semantic conventions, otel already has plenty of bloat issues, don't really need more of them |
@t2t2 Thanks very much. Maintainers discussed this again. (That was last week. I didn't get back to updating this issue. My bad.) Concensus was to change to recommending copying used unstable semconv attributes, rather than pinning. The main argument against pinning was: the disk size taken by a number of installs of My plan is to:
|
It is recommended that users (typically instrumentation libraries) of *unstable* semconv create a local copy of relevant definitions, rather than pinning. Pinning of this package can easily lead to very many versions of the package being installed, which leads to heavy disk usage. Refs: open-telemetry#5182
[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: