Skip to content

Add otelTraceSampled field to LogEntry for OLTP Logging Instrumentation module #1765

@bitnahian

Description

@bitnahian

Before opening a feature request against this repo, consider whether the feature should/could be implemented in the other OpenTelemetry client libraries. If so, please open an issue on opentelemetry-specification first.

Is your feature request related to a problem?
Getting span id and trace id in the log record is a must. Cloud provider libraries, e.g. Google Cloud Logging also provides a logging.googleapis.com/trace_sampled field under structured logging, which can be populated using this library.

Describe the solution you'd like
Add a record.otelTraceSampled field similar to record.otelSpanID and record.otelTraceID in the log entry using the trace_flags property in SpanContext.

Describe alternatives you've considered
Manually injecting the value of trace_flags property into the log record by using the current SpanContext.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions