Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log: Logger should be indentified also by SchemeURL #5366

Closed
pellared opened this issue May 16, 2024 · 2 comments · Fixed by #5375
Closed

log: Logger should be indentified also by SchemeURL #5366

pellared opened this issue May 16, 2024 · 2 comments · Fixed by #5375
Assignees
Labels
area:logs Part of OpenTelemetry logs bug Something isn't working pkg:API Related to an API package
Milestone

Comments

@pellared
Copy link
Member

From spec https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/bridge-api.md#get-a-logger:

Loggers are identified by name, version, and schema_url fields.

In code:

key := instLib{name, cfg.InstrumentationVersion()}
if p.loggers == nil {
l := &logger{name: name, options: options}
p.loggers = map[instLib]*logger{key: l}
return l
}
if l, ok := p.loggers[key]; ok {
return l
}
l := &logger{name: name, options: options}
p.loggers[key] = l
return l

We are missing SchemeURL in the key.

Side note: There may be the same bug for other signals.

@pellared pellared added bug Something isn't working pkg:API Related to an API package area:logs Part of OpenTelemetry logs labels May 16, 2024
@MrAlias MrAlias self-assigned this May 17, 2024
@pellared
Copy link
Member Author

pellared commented May 17, 2024

It looks like the same issue is for Tracer and Meter:

type il struct {
name string
version string
}

@MrAlias
Copy link
Contributor

MrAlias commented May 17, 2024

It looks like the same issue is for Tracer and Meter:

type il struct {
name string
version string
}

Please open issues to track these needed changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:logs Part of OpenTelemetry logs bug Something isn't working pkg:API Related to an API package
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants