You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(node): Fix preloading of instrumentation (#17403)
Extracted out of
#17371
I noticed that we were not fully consistent in instrumentation IDs for
integrations that have multiple instrumentation. The intent is that
users can provide the _integration name_ (e.g. `Http`) and it will
preload all http instrumentation. To achieve this, I adjusted the
preload filter code to look for exact matches as well as
`startsWith(`${name}.id`)`. I also adjusted the test to be more
declarative and mock/reset stuff properly (this lead to issues in the
linked PR, and should generally be a bit cleaner).
I also updated all instrumentation IDs to follow this pattern. We should
be mindful of following this with new instrumentation we add.
Copy file name to clipboardExpand all lines: .cursor/BUGBOT.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,3 +40,4 @@ Do not flag the issues below if they appear in tests.
40
40
- If there's no direct span that's wrapping the captured exception, apply a proper `type` value, following the same naming
41
41
convention as the `SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN` value.
42
42
- When calling `startSpan`, check if error cases are handled. If flag that it might make sense to try/catch and call `captureException`.
43
+
- When calling `generateInstrumentationOnce`, the passed in name MUST match the name of the integration that uses it. If there are more than one instrumentations, they need to follow the pattern `${INSTRUMENTATION_NAME}.some-suffix`.
0 commit comments