-
Notifications
You must be signed in to change notification settings - Fork 2
Add min_log_level config #43
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
Conversation
8af111f
to
309500d
Compare
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, just a small suggestion!
src/internal/exporters/console.rs
Outdated
if let Some(level) = level { | ||
// Filter out span below the minimum log level | ||
if level < level_to_level_number(self.options.min_log_level) { | ||
return Ok(()); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be worth reordering this to avoid the option check, something like
if let Value::I64(level_num) = kv.value {
if level_num < level_to_level_number(self.options.min_log_level) {
return Ok(());
}
level = Some(level_num);
}
and similar below in otel_data_to_writer
.
0614204
to
2285fa0
Compare
2285fa0
to
7e605ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
No description provided.