-
Notifications
You must be signed in to change notification settings - Fork 12
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
Upgrade to tracing-subscriber 0.3 #13
Conversation
Thanks very much. Aiming for a release sometime this week. Will make sure to include this. |
You're welcome! Thank you for this library, it's really easy to use. |
} | ||
|
||
spans | ||
let span = ctx.current_span().id().and_then(|id| { |
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.
I did a little jiggle around before 0.6
. Do you mind rebasing against lastest master
, this should work
let span = ctx.current_span().id().and_then(|id| {
ctx.span_scope(id).map(|scope| {
scope.from_root().fold(String::new(), |mut spans, span| {
// Add span fields to the base object
if let Some(span_object) = span.extensions().get::<HashMap<Cow<'static, str>, Value>>() {
object.extend(span_object.clone());
}
if spans != String::new() {
spans = format!("{}:{}", spans, span.name());
} else {
spans = span.name().to_string();
}
spans
})
})
});
if let Some(span) = span {
object.insert("_span".into(), span.into());
}
Updated the library to use the newer tracing-subscriber traits. Changed the least amount of code possible and tested checking for regression. Bumped the library version as the interfaces have changed.
I've updated my PR. |
@bertof Thanks |
@bertof Released in |
Updated the library to use the newer tracing-subscriber traits.
Changed the least amount of code possible and tested checking for regression.
Bumped the library version as the interfaces have changed.