-
Notifications
You must be signed in to change notification settings - Fork 39
fix: bumped @opentelemetry/sdk-trace-base to v2 #2196
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,14 +18,6 @@ module.exports.init = () => { | |
| instrumentation.enable(); | ||
| } | ||
| }; | ||
| exports.transform = otelSpan => { | ||
| // NOTE: This assignment is necessary to display the database name in the UI. | ||
| // In the backend, for OpenTelemetry, the service name is based on the OpenTelemetry span attribute service.name. | ||
| if (otelSpan.attributes && 'db.name' in otelSpan.attributes) { | ||
| otelSpan.resource._attributes['service.name'] = otelSpan.attributes['db.name']; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes agree. This is something not needed as we already fixed the issue in wrap.js |
||
| } | ||
| return otelSpan; | ||
| }; | ||
|
|
||
| module.exports.getKind = () => { | ||
| const kind = constants.EXIT; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,11 +40,19 @@ | |
| }); | ||
|
|
||
| const transformToInstanaSpan = otelSpan => { | ||
| if (!otelSpan || !otelSpan.instrumentationLibrary) { | ||
| // TODO: remove instrumentationLibrary in next major release | ||
|
Check warning on line 43 in packages/core/src/tracing/opentelemetry-instrumentations/wrap.js
|
||
| // instrumentationScope was introduced in OpenTelemetry v2 | ||
| if (!otelSpan || (!otelSpan.instrumentationScope && !otelSpan.instrumentationLibrary)) { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See open-telemetry/opentelemetry-js@97bc632 Leaving both names for now. |
||
| return; | ||
| } | ||
|
|
||
| const targetInstrumentionName = | ||
| otelSpan.instrumentationScope?.name || otelSpan.instrumentationLibrary?.name || null; | ||
|
|
||
| if (!targetInstrumentionName) { | ||
| return; | ||
| } | ||
|
|
||
| const targetInstrumentionName = otelSpan.instrumentationLibrary.name; | ||
| let kind = constants.EXIT; | ||
|
|
||
| if (instrumentations[targetInstrumentionName] && instrumentations[targetInstrumentionName].module) { | ||
|
|
||
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 am not sure why this is not instrumentationLibrary 🤔