1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-03-29 21:47:00 +02:00

[doc] sdk/log: Do not create instances of Record (#5871)

Fixes https://github.com/open-telemetry/opentelemetry-go/issues/5823
This commit is contained in:
Robert Pająk 2024-10-04 07:00:21 +02:00 committed by GitHub
parent d37e1ef81c
commit 3da26f0e00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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.