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

Logging improvements #824

Merged
merged 2 commits into from
Nov 1, 2023
Merged

Logging improvements #824

merged 2 commits into from
Nov 1, 2023

Conversation

akoshelev
Copy link
Collaborator

See individual commits for details

Currently, it is not possible to have module-level granularity configuration for logging. Setting up `-vvv` makes IPA to log all trace events, including those coming from third-party.

This change enables this functionality by optionally reading logging configuration from `RUST_LOG`
```
2023-10-31T20:35:01.600364Z TRACE oprf_ipa_query{sz=10000}:send{i=914 total=1658 to=H2 gate="protocol/binary_validator/row1/attributed_breakdown_key/bit7"}: ipa::helpers::gateway::send: new
2023-10-31T20:35:01.600382Z TRACE oprf_ipa_query{sz=10000}:send{i=914 total=1658 to=H2 gate="protocol/binary_validator/row1/attributed_breakdown_key/bit7"}: ipa::helpers::gateway::send: close time.busy=2.42µs time.idle=15.7µs
```

it is a bit verbose, but logging enter/exit allows to see if send was completed (because it may be blocked if it is out of bounds) and the timing.
Copy link
Contributor

@richajaindce richajaindce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! If you could copy the per-commit comments to the PR, it will be easier to find pointers when anyone wants to debug something.

@akoshelev
Copy link
Collaborator Author

yep, after this change you could use RUST_LOG to control the debug output

RUST_LOG=ipa=TRACE cargo run ...

this will filter out the noise from Hyper and Axum

@akoshelev akoshelev merged commit b4d10d6 into main Nov 1, 2023
10 checks passed
@akoshelev akoshelev deleted the logging-improvements branch November 1, 2023 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants