Skip to content

Extract spanId from metadata to populate LogEntry in the same way as trace #559

@synsteve

Description

@synsteve

Is your feature request related to a problem? Please describe.

There currently is no way to associate a LogEntry with a span. You have provided a way to set the trace key (by setting a metadata property with the key [LoggingWinston.LOGGING_TRACE_KEY] (currently "logging.googleapis.com/trace"), which works great.

Describe the solution you'd like

Can you add the same functionality for the span id?
The standard field for this is "logging.googleapis.com/spanId" and should translate the to the spanId property of LogEntry.

This should help Cloud Trace to better associate log entries with tracing information. Maybe you could even do this generically for all LogEntry properties?

Thanks!

Metadata

Metadata

Assignees

Labels

api: loggingIssues related to the googleapis/nodejs-logging-winston API.priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions