Skip to content
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

Hydroflow programs should automatically log tick number and/or stratum with every log line #1402

Open
rohitkulshreshtha opened this issue Aug 19, 2024 · 0 comments
Labels

Comments

@rohitkulshreshtha
Copy link
Contributor

The tick number and current stratum information are helpful for debugging issues in running transducers. It would be ideal if these were logged automatically for log lines logged by hydroflow programs.

It looks like this works currently, but only in particular scenarios. For the log lines to appear, the user must set the global logging level to the same setting as the tracing::instrument (currently TRACE).

So, for example, if your program logs "Received get request" and you run with
RUST_LOG="trace"

RUST_LOG="info,gossip_server::server=trace" cargo test

You would see something like this:

2024-08-19T21:21:44.883674Z TRACE run_tick:run_stratum{tick=530 stratum=0}: gossip_server::server: Received Get request: (Key { namespace: User, table: "table", row_key: "row" }, Address { host: "reader", interface: "client" }).

You would also see a lot of TRACE statements from other parts of the code.

To reduce this noise, if you choose to limit log messages to a specific module:

RUST_LOG="gossip_server::server=trace" cargo test

The tick/stratum information disappears:

2024-08-19T21:23:22.154790Z TRACE gossip_server::server: Received Get request: (Key { namespace: User, table: "table", row_key: "row" }, Address { host: "reader", interface: "client" }).

Continuing to show the tick/stratum information when filtering is enabled will help the user debug production issues more effectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants