Skip to content

In "go.opentelemetry.io/otel/sdk/log" module, the record.Resource should return a pointer *resource.Resource type #6863

@markxp

Description

@markxp

Description

In version v1.36.0

go.mod

require (	
        .... trimmed
	go.opentelemetry.io/otel/sdk v1.36.0 // indirect
        go.opentelemetry.io/otel/sdk/log v0.12.2 // indirect
)

As "go.opentelemetry.io/otel/sdk/resource" package documented,

Resources should be passed and stored as pointers 
(`*resource.Resource`).  The `nil` value is equivalent to an empty
Resource.

The log.Record type has Resource() method but returns (resource.Resource) not (*resource.Resource).
Which I think it is a bug.

Environment

go 1.24.2

Expected behavior

A record calls Resource() should return a (*resource.Resource).

Metadata

Metadata

Assignees

Labels

area:logsPart of OpenTelemetry logsbugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions