Open corentinmusard opened 3 months ago
This is not a stable JSON representation. See https://pkg.go.dev/go.opentelemetry.io/otel/exporters/stdout/stdoutlog#pkg-overview:
it does not provide an interchange format for OpenTelemetry that is supported with any stability or compatibility guarantees
However, it is possible we could provide such functionality as part of otlplogfile
package. Reference:
Problem Statement
I want to write log record to a file in JSON format, is there any way to do it?
I saw in https://github.com/open-telemetry/opentelemetry-go/pull/5172#discussion_r1555020640 that this feature has been postponed.
Proposed Solution
Export this method:
func (e *Exporter) newRecordJSON(r sdklog.Record) recordJSON