1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-12-01 23:12:29 +02:00

Make scope attributes as identifying for Logger (#5925)

Towards https://github.com/open-telemetry/opentelemetry-go/issues/3368
This commit is contained in:
Robert Pająk
2024-10-30 06:34:24 +01:00
committed by GitHub
parent ee56fb97e0
commit 6a2f7de06d
5 changed files with 18 additions and 5 deletions

View File

@@ -124,9 +124,10 @@ func (p *LoggerProvider) Logger(name string, opts ...log.LoggerOption) log.Logge
cfg := log.NewLoggerConfig(opts...)
scope := instrumentation.Scope{
Name: name,
Version: cfg.InstrumentationVersion(),
SchemaURL: cfg.SchemaURL(),
Name: name,
Version: cfg.InstrumentationVersion(),
SchemaURL: cfg.SchemaURL(),
Attributes: cfg.InstrumentationAttributes(),
}
p.loggersMu.Lock()