-
Notifications
You must be signed in to change notification settings - Fork 84
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
Setting trace and span id in logs. #119
Comments
Sorry, I don't understand what you're saying. If you set up you subscriber/formatter to print span attributes, then all logs after that It's true this crate could probably create something to make this easier on users so that you wouldn't have to resort to manually appending the trace ID. |
Apologies I am fairly new to setting up tracing, with many libraries working together its quite unclear where I should be trying to make these changes. Additionally trying to set ids in tracing seems to be an issue stumping alot of people from what I have seen from searching around. Creating a custom formatter seems to be the best maybe, but so far seem to running into issues with this effecting the otlp exporter/pipeline. Please close if this seems too off topic for this crate. |
@ShovelJockey, are you able to explain how you got it partially working? I don't see any crate called |
I still don't see a clear description in this issue of what you're actually trying to achieve. |
I am attempting to implement otel tracing with axum, I found a hacky method that seemed to work for some span events like close but not for new with:
span.record("trace_id", tracing_id::find_trace_id_from_tracing(&span));
After creating the span, was hoping someone else might have a better method for getting this context into the logs, the traces themselves seem to be working well.
The text was updated successfully, but these errors were encountered: