#Using tokio-console.

10 messages · Page 1 of 1 (latest)

turbid trellis

I have followed the steps for instrumenting my application, and tokio-console connects but it doesn't show anything. It shows 0 tasks. There is obviously something I am missing, but I am not sure what it could be.

quaint pine

Can you put your tracing subscriber initialisation here.

That’s likely to be where the problem is.

turbid trellis

It is, I switched to console_subscriber: :init() and it worked.

Before I was using a registry.with(console_subscriber:: spawn()).

Sorry, hard to share the exact code because my work computer is locked down

quaint pine

Did you also have other layers when used it with the registry?

turbid trellis

Yes, syslog subscriber layer and EnvFilter layer

quaint pine

Are you adding the env filter to the registry using with or are you adding it to some layer?

(Using with_filter on the layer itself)

turbid trellis

I am using with(filter)

quaint pine

That filter is global for all layers then. Which means you’re probably filtering out the spans and events that come from tokio’s instrumentation, and that’s why the console doesn’t get anything.