fix: bumped @opentelemetry/sdk-trace-base to v2#2196
Conversation
a6dc436 to
694c185
Compare
637603a to
4388d65
Compare
| // 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']; |
There was a problem hiding this comment.
otelSpan.resource._attributes no longer exists in v2.
I tested tedious manually. Works fine. I am not sure why we had to add this earlier, but seems like we don't need this anymore.
There was a problem hiding this comment.
Yes agree. This is something not needed as we already fixed the issue in wrap.js
Nice cleanup.
| if (!otelSpan || !otelSpan.instrumentationLibrary) { | ||
| // TODO: remove instrumentationLibrary in next major release | ||
| // instrumentationScope was introduced in OpenTelemetry v2 | ||
| if (!otelSpan || (!otelSpan.instrumentationScope && !otelSpan.instrumentationLibrary)) { |
There was a problem hiding this comment.
See open-telemetry/opentelemetry-js@97bc632
Leaving both names for now.
| expect(response.otelspan.instrumentationLibrary).to.be.an('object'); | ||
| expect(response.otelspan.instrumentationLibrary.name).to.eql('otel-sdk-app-tracer'); | ||
| expect(response.otelspan.instrumentationScope).to.be.an('object'); | ||
| expect(response.otelspan.instrumentationScope.name).to.eql('otel-sdk-app-tracer'); |
There was a problem hiding this comment.
I am not sure why this is not instrumentationLibrary 🤔
|
@copilot squash all commits into one with the following single commit fix: bumped @opentelemetry/sdk-trace-base to v2 |
e26f4f3 to
e45b5c9
Compare
|



refs https://jsw.ibm.com/browse/INSTA-66063
@opentelemetry/sdk-trace-base v2 supports >= 18.19.
We cannot merge that into main.