-
Hi, I'm trying to understand how tracing is done for a release build. I can't find anything on the internet, which (in my experience) is usually a sign that either it's painfully obvious and I haven't found it, or that it's not even an issue at all. When everything is setup to view tracing using tokio-console, I can't build a release version. As a result, I imagine the tracing is slightly misrepresentative of the release performance. My questions are as follows:
Thanks in advance for any help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This should work without any issue. If you have the tokio_unstable cfg flag set and the tracing feature enabled in tokio, the console-subscriber should be receiving the tracing based instrumentation it needs to make tokio-console function. Being in release mode won't change this, so I imagine that there is a difference in your cargo set up between debug and release.
They will be faster, how much faster depends on a few factors and the sort of code that you're running. For example, serde is a lot slower in debug builds.
As mentioned above, it works the same as a debug build, so yes. Aside from confirming your suspicion that it should just work, I haven't been able to help much here with what is actually causing the traces to not appear in your release build. If you can describe your tracing set up a bit more, I can try to take a few more guesses at what's going on. |
Beta Was this translation helpful? Give feedback.
This should work without any issue. If you have the tokio_unstable cfg flag set and the tracing feature enabled in tokio, the console-subscriber should be receiving the tracing based instrumentation it needs to make tokio-console function. Being in release mode won't change this, so I imagine that there is a difference in your cargo set up between debug and release.
They will be faster, how much faster depends on a few factors and the sort of code that you're running. For example, serde is a lot slowe…