-
Notifications
You must be signed in to change notification settings - Fork 94
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
Move from slog
to tracing
#317
Comments
I'm curious - a while ago I was looking into https://github.com/tikv/pprof-rs to get better visibility into where bottlenecks are in the codebase. My thought being, that then we would't have to manually instrument the codebase. Would something like that be used in conjunction with something like (I've been meaning to ping you on what tooling you like for performance tracing for Rust). |
Well these two particular libraries are probably competitors right now, because |
From a logging point of view, as long as we still get structured JSON logging, I'm happy 😄, and it looks like https://docs.rs/tracing-subscriber/0.2.19/tracing_subscriber/fmt/format/struct.Json.html or
That's the only concern I really have - how much work does it take to build out crafted events? Could we possibly miss a bottleneck / potential performance improvement spot if we have to manually craft our events? That all being said - the integration with opentelemetry and distributed tracing is certainly very interesting (I've been thinking a bit about how we could do tracing across proxies, so this seems prescient): As well as the general focus on how to debug async operations. 👍🏻 This is super interesting! I chose slog because it was simple, and closest to what I knew from doing similar things in Go - but the use cases I had in the past were different. The other thing I like about this - is it decouples our logging from the quilkin library, and if we have a consumer as a library that wants to align the logging output with what they do (which may be different from our own), they can do that through their own collector. I would recommend one of us doing a small POC first, see what the end results are, and if we are all happy, let's move ahead with it? I really liked this article for really getting my head around how tracing works: 👍🏻 on my end! |
It's not a lot of work to get something useful. You just tag every function you want to instrument with |
Yeah - this is very exciting. I like this a lot. One thing that came up recently in a chat I was having - since we can export this to OpenTelemetry, we can export traces with routing tokens to a distributed tracing store (Honeycomb, Google Cloud monitoring, Grafana Tempo, Datadog etc) -- then you can start to tie player data to tracing info and metrics, which can be another avenue to identify bad actors. This has a lot of very interesting and useful applications both for performance testing as well as at scale 👍🏻 |
tracing
is a diagnostic built and maintained by the Tokio team. It handles logging, but it provides a lot more as it's design for general instrumentation, for example there's a companion crate that uses the output to provide flamegraphs from the events. So usingtracing
would provide us with a lot more insight into what's happening at runtime than our current logging solution.The text was updated successfully, but these errors were encountered: