You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-09-16 09:26:25 +02:00
sdk/log: Record.Resource to return *resource.Resource (#6864)
Fixes https://github.com/open-telemetry/opentelemetry-go/issues/6863 From https://pkg.go.dev/go.opentelemetry.io/otel/sdk/resource#Resource: > Resource is an immutable object > [...] > Resources should be passed and stored as pointers (`*resource.Resource`) In all other places the exported API uses `*resource.Resource` and not `resource.Resource`.
This commit is contained in:
@@ -106,7 +106,7 @@ func (e *Exporter) newRecordJSON(r sdklog.Record) recordJSON {
|
||||
|
||||
Attributes: make([]keyValue, 0, r.AttributesLen()),
|
||||
|
||||
Resource: &res,
|
||||
Resource: res,
|
||||
Scope: r.InstrumentationScope(),
|
||||
|
||||
DroppedAttributes: r.DroppedAttributes(),
|
||||
|
Reference in New Issue
Block a user