Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
### Removed

- Drop support for [Go 1.22]. (#6381, #6418)
- Remove `Resource` field from `EnabledParameters` in `go.opentelemetry.io/otel/sdk/log`. (#6494)

### Changed

Expand Down
2 changes: 0 additions & 2 deletions sdk/log/filter_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (

"go.opentelemetry.io/otel/log"
"go.opentelemetry.io/otel/sdk/instrumentation"
"go.opentelemetry.io/otel/sdk/resource"
)

// FilterProcessor is a [Processor] that knows, and can identify, what [Record]
Expand Down Expand Up @@ -56,7 +55,6 @@ type FilterProcessor interface {

// EnabledParameters represents payload for [FilterProcessor]'s Enabled method.
type EnabledParameters struct {
Resource resource.Resource
InstrumentationScope instrumentation.Scope
Severity log.Severity
}
1 change: 0 additions & 1 deletion sdk/log/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ func (l *logger) Emit(ctx context.Context, r log.Record) {
// returned if it can be positively verified that no Processor will process.
func (l *logger) Enabled(ctx context.Context, param log.EnabledParameters) bool {
p := EnabledParameters{
Resource: *l.provider.resource,
InstrumentationScope: l.instrumentationScope,
Severity: param.Severity,
}
Expand Down
8 changes: 0 additions & 8 deletions sdk/log/logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,6 @@ func TestLoggerEnabled(t *testing.T) {
p1 := newFltrProcessor("1", true)
p2WithDisabled := newFltrProcessor("2", false)

emptyResource := resource.Empty()
res := resource.NewSchemaless(attribute.String("key", "value"))

testCases := []struct {
name string
logger *logger
Expand All @@ -247,12 +244,10 @@ func TestLoggerEnabled(t *testing.T) {
logger: newLogger(NewLoggerProvider(
WithProcessor(p0),
WithProcessor(p1),
WithResource(res),
), instrumentation.Scope{Name: "scope"}),
ctx: context.Background(),
expected: true,
expectedP0Params: []EnabledParameters{{
Resource: *res,
InstrumentationScope: instrumentation.Scope{Name: "scope"},
}},
expectedP1Params: nil,
Expand All @@ -261,7 +256,6 @@ func TestLoggerEnabled(t *testing.T) {
name: "WithDisabledProcessors",
logger: newLogger(NewLoggerProvider(
WithProcessor(p2WithDisabled),
WithResource(emptyResource),
), instrumentation.Scope{}),
ctx: context.Background(),
expected: false,
Expand All @@ -272,7 +266,6 @@ func TestLoggerEnabled(t *testing.T) {
logger: newLogger(NewLoggerProvider(
WithProcessor(p2WithDisabled),
WithProcessor(p0),
WithResource(emptyResource),
), instrumentation.Scope{}),
ctx: context.Background(),
expected: true,
Expand All @@ -284,7 +277,6 @@ func TestLoggerEnabled(t *testing.T) {
logger: newLogger(NewLoggerProvider(
WithProcessor(p0),
WithProcessor(p1),
WithResource(emptyResource),
), instrumentation.Scope{}),
ctx: nil,
expected: true,
Expand Down
Loading