Skip to content

Commit

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

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

* fixup! feat(sdk-trace-base): log resoruce attributes in ConsoleSpanExporter
  • Loading branch information
pichlermarc committed Apr 10, 2024
1 parent c046867 commit 0b6463e
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 0b6463e

Please sign in to comment.