79 questions
1 vote
1 answer
155 views
How to rehydrate current span in Rust tracing/otel
I'm writing a Pingora proxy instance. It uses multiple async functions from a trait to indicate various stages. There is a common context that I can provide. I am trying to instrument the whole ...
0 votes
1 answer
102 views
Issues with Box<dyn> and tokio tracing subscriber
I am working with the tokio tracing/tracing_subscriber crates building an internal toolkit and have been running into issues trying to add an option to pass a custom formatter to the layer. Using the ...
0 votes
1 answer
129 views
Using crate tracing_subscriber with info_span! report a panic
i am trying to using tracing & tracing_subscriber with axum it's my code snippet main function: fn main() -> Result<(), io::Error> { let rt = runtime::Builder::new_current_thread() ...
2 votes
0 answers
255 views
How to customize Json field values formatting in tracing_subscriber?
I use Rust's tracing_subscriber library to configure different layers for different targets. Is it possible to customize (actually, pseudonymize) the output format of some fields within the existing ...
1 vote
2 answers
412 views
Strange symbols (ansi) in a log file when using tracing_subscriber
I have weird symbols added to a log file, I guess its some prettification with ANSI for terminal output: 2024-10-23T00:00:19.268093Z TRACE process_token{^[[3mmint^[[0m^[[2m=^[[0m"...
0 votes
1 answer
813 views
Tracing span doesn't include all log events
So, I'm learning axum and tracing crates by following Zero to Production in Rust book. I'm trying to add tracing to log span that will include a request id. When I enter span outside this match ...
1 vote
1 answer
362 views
How to make rust tracing_subscriber output valid JSON (i.e. `null`) for log facets with `Option::None`
I'm using rust's tracing and tracing_subscriber crates with .json() to enable JSON formatting of logs: tracing_subscriber::fmt() .json() .flatten_event(true) .finish() .init(); ...
0 votes
0 answers
250 views
How to do runtime changes to the filter level for logs using tracing library in Rust
I have a Rust application I am instrumenting, and I would like to be able to set the log filtering level dynamically for a given span tree. Note that I don't want to change the log level for the whole ...
3 votes
2 answers
2k views
How to add traces/spans to async function?
I'm having trouble adding tracing to a particular function in my rust project. Here are the relevant files // chain/ethereum/src/ingestor.rs #[tracing::instrument(skip(self), name = "...
0 votes
1 answer
392 views
OpenTelemetry span exporter blocks from within tonic RPC
I want to export spans using the OpenTelemetry Protocol from inside of a tonic service. My attempts to do this seemingly result in deadlock. I've created a minimal example here. Here's a summary: I ...
0 votes
1 answer
144 views
colors not working on default terminal for release rust exe
I use tracing and tracing-subscriber for logging. It uses colour codes, which works in windows terminal and the vscode terminal. However, the terminal that opens when double-clicking the built exe ...
2 votes
1 answer
1k views
Rust tracing not generating span IDs or associating with parents
I have a tracing subscriber like: let subscriber = tracing_subscriber::registry().with( tracing_subscriber::fmt::layer() .compact() .with_file(true) ....
1 vote
0 answers
296 views
How to Prevent Infinite Logging Loop with Tokio-Tracing and Hyper in a Custom Subscriber in Rust?
Note - I have gone through Suppressing external library logs in a tokio tracing subscriber and How to turn off tracing events emitted by other crates?, and they don't answer this question. Context: I'...
1 vote
2 answers
1k views
Filtering out messages using tracing_subscriber::filter::Directive
I'm trying to filter out the PartitionEOF error log messages that the rdkafka crate produces when you have enable.partition.eof set to true. We're using the tracing and tracing-subscriber traits for ...
0 votes
1 answer
68 views
Using the rust tracing library with daemonize
I would like to use the tracing library together with deamonize. Consider the following example use tracing::info; use tracing_subscriber::layer::SubscriberExt; use tracing_subscriber::{fmt, Registry};...