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

fix: add support for exporting opentelemetry logs_level_enabled feature #166

Closed

Conversation

HoKim98
Copy link

@HoKim98 HoKim98 commented Sep 18, 2024

Motivation

When building tracing-opentelemetry and the opentelemetry crate with logs_level_enabled feature on a crate, it fails to build on opentelemetry>=0.25.0.

It's because the opentelemetry::logs::Logger trait contains a fn event_enabled which is only enabled with the logs_level_enabled feature.

See also:
https://github.com/open-telemetry/opentelemetry-rust/blame/3976f3d4867d564c98a566df83eb59e31c653b84/opentelemetry-sdk/src/logs/log_emitter.rs#L270-L284

Solution

Add support for exporting opentelemetry logs_level_enabled feature

@djc
Copy link
Collaborator

djc commented Sep 18, 2024

So is the motivation here that in your downstream crate you don't depend on opentelemetry-sdk directly at all?

@HoKim98
Copy link
Author

HoKim98 commented Sep 19, 2024

Ah no, I used both opentelemetry and opentelemetry_sdk crates with logs_level_enabled feature.

@djc
Copy link
Collaborator

djc commented Sep 19, 2024

So why should this crate be involved in that decision?

@HoKim98 HoKim98 closed this Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants