Skip to content

Commit

Permalink
feat(sdk-trace-base): log resource attributes in ConsoleSpanExporter (o…
Browse files Browse the repository at this point in the history
…pen-telemetry#4605)

* feat(sdk-trace-base): log resoruce attributes in ConsoleSpanExporter

* fixup! feat(sdk-trace-base): log resoruce attributes in ConsoleSpanExporter
  • Loading branch information
pichlermarc authored and Zirak committed Sep 14, 2024
1 parent 468b8a1 commit f25943a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ For experimental package changes, see the [experimental CHANGELOG](experimental/

### :rocket: (Enhancement)

feat(sdk-trace-base): log resource attributes in ConsoleSpanExporter [#4605](https://github.com/open-telemetry/opentelemetry-js/pull/4605) @pichlermarc

### :bug: (Bug Fix)

* fix(sdk-trace-web): fix invalid timings in span events [#4486](https://github.com/open-telemetry/opentelemetry-js/pull/4486) @Abinet18
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ export class ConsoleSpanExporter implements SpanExporter {
*/
private _exportInfo(span: ReadableSpan) {
return {
resource: {
attributes: span.resource.attributes,
},
traceId: span.spanContext().traceId,
parentId: span.parentSpanId,
traceState: span.spanContext().traceState?.serialize(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ describe('ConsoleSpanExporter', () => {
'links',
'name',
'parentId',
'resource',
'status',
'timestamp',
'traceId',
Expand Down

0 comments on commit f25943a

Please sign in to comment.