-
Notifications
You must be signed in to change notification settings - Fork 534
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
chore(instrumentation-pg): Inline incubating constants from @opentelemetry/semantic-conventions #2599
base: main
Are you sure you want to change the base?
chore(instrumentation-pg): Inline incubating constants from @opentelemetry/semantic-conventions #2599
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2599 +/- ##
==========================================
+ Coverage 90.78% 90.79% +0.01%
==========================================
Files 169 170 +1
Lines 8055 8064 +9
Branches 1643 1643
==========================================
+ Hits 7313 7322 +9
Misses 742 742
|
The reason for this versioning being pinned, it's because this package is using the I see other packages that use the |
Ah! Apologies, I didn't go digging deep enough. In that case, can I just change this PR to pin to 1.28.0 so that it will be deduped by package managers (at least until 1.29.0 comes out)? |
Hi 🙂 I'd say it's a mistake. When using the incubating entrypoint, we should always pin for now until we have a decision on open-telemetry/opentelemetry-js#5182. Sorry for the inconvenience. |
Hi @nwalters512 , looks like we will go with a different approach of copying those specific values from the incubation, see more here: open-telemetry/opentelemetry-js#5182 (comment) I would be happy to review if that is something you want to work on. |
@maryliag I'd be happy to open some PRs for this! I'll work on |
thank you @nwalters512! |
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.
@maryliag I repurposed this PR to include the inlining of the relevant constants.
@@ -65,7 +65,7 @@ import { | |||
METRIC_DB_CLIENT_OPERATION_DURATION, | |||
ATTR_DB_NAMESPACE, | |||
ATTR_DB_OPERATION_NAME, | |||
} from '@opentelemetry/semantic-conventions/incubating'; | |||
} from './semantic-conventions'; |
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.
open-telemetry/opentelemetry-js#5182 (comment) suggested using semconv.ts
; I went with semantic-conventions.ts
since it directly matches the package name. Happy to use the other suggestion if that's strongly preferred.
/** | ||
* These constants are considered experimental exports of `@opentelemetry/semantic-conventions`. | ||
* They're being inlined until they're officially exported by `@opentelemetry/semantic-conventions`. | ||
*/ |
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 little comment will appear at the top of this file in other packages; let's workshop it if needed before it proliferates.
/** | ||
* The number of connections that are currently in state described by the `state` attribute | ||
* | ||
* @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`. |
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.
I copied these all in full, including the "experimental" warning. Happy to edit this to remove it desired.
Sorry about the failing tests, I'll get those fixed up. |
Thank you for working on this! @trentm would you mind confirming if that is what you had in mind? |
Which problem is this PR solving?
No other instrumentation packages pin@opentelemetry/semantic-conventions
, and from what I can tell, there's no good reason that@opentelemetry/instumentation-pg
should be pinning it. When the dependency is pinned, npm can't dedupe it to a higher version, which results in multiple versions of this package being installed.As decided in open-telemetry/opentelemetry-js#5182 (comment),
incubating
constants from@opentelemetry/semantic-conventions
should be inlined instead of pinning@opentelemetry/semantic-conventions
to a particular version.Short description of the changes
In@opentelemetry/instrumentation-pg
,@opentelemetry/semantic-conventions
now uses a^
semver range to allow newer minor versions to be installed.This PR updates
@opentelemetry/instrumentation-pg
to include inlined copies of the experimental constants it needs. This, in turn, allows us to unpin@opentelemetry/semantic-conventions
.