From 3da26f0e006a8dc673bdadc6ed918e51127c1a3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Fri, 4 Oct 2024 07:00:21 +0200 Subject: [PATCH] [doc] sdk/log: Do not create instances of Record (#5871) Fixes https://github.com/open-telemetry/opentelemetry-go/issues/5823 --- sdk/log/record.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdk/log/record.go b/sdk/log/record.go index effb30f62..ea842660b 100644 --- a/sdk/log/record.go +++ b/sdk/log/record.go @@ -42,6 +42,10 @@ func putIndex(index map[string]int) { } // Record is a log record emitted by the Logger. +// +// Do not create instances of Record on your own in production code. +// You can use [go.opentelemetry.io/otel/sdk/log/logtest.RecordFactory] +// for testing purposes. type Record struct { // Do not embed the log.Record. Attributes need to be overwrite-able and // deep-copying needs to be possible.