-
Notifications
You must be signed in to change notification settings - Fork 821
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
feat: include instrumentation scope info in console span and log record exporters #4848
feat: include instrumentation scope info in console span and log record exporters #4848
Conversation
@@ -65,6 +65,7 @@ export class ConsoleSpanExporter implements SpanExporter { | |||
resource: { | |||
attributes: span.resource.attributes, | |||
}, | |||
instrumentationLibrary: span.instrumentationLibrary, |
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.
Aside: Do you think we'll ever change the property to span.instrumentationScope
given that the InstrumentationLibrary
type is deprecated (https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-core/src/common/types.ts#L42-L63) ?
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 think we should emit it with the name instrumentationScope
. Updated the PR Thanks 👍
Lint failures. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4848 +/- ##
==========================================
+ Coverage 91.04% 93.24% +2.20%
==========================================
Files 89 337 +248
Lines 1954 9622 +7668
Branches 416 2020 +1604
==========================================
+ Hits 1779 8972 +7193
- Misses 175 650 +475
|
Thank you @trentm for the review, addressed your good suggestions and fixed the lint 👍 |
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.
LGTM
…rd exporters (open-telemetry#4848) * feat: print instrumentation library info with console span exporter * chore: add changelog * test: fix tests for console span exporter * feat: instrumentation scope for both logs and spans * chore: update changelog
The
ConsoleSpanExporter
prints many useful information to the console about a span, but it lacks theinstrumentationLibrary
. This info is present on theReadableSpan
, but it was probably forgotten, as the resource is included and the span info is included, but there is no way currently to view the library info for an output span:This PR adds this info the the output.