Skip to content

fix(observability): ensure internal rate limiting is logged #1151

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

Merged
merged 1 commit into from
Nov 6, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ fn main() {
format!("vector={}", level),
format!("codec={}", level),
format!("file_source={}", level),
format!("tower_limit=trace"),
Copy link
Contributor

Choose a reason for hiding this comment

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

actually, do we want to use {} here?

Copy link
Member Author

Choose a reason for hiding this comment

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

There's only one trace event in the whole crate and it's at trace level, so it's the only level that will ever show anything.

I'd actually like for this to be at warn, but that seemed aggressive to hardcode into a library. If there were a way to translate into our desired levels, then I'd definitely use {} here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Well this might happen more often this will enable it for every log level. That seems a bit wrong?

Copy link
Member Author

Choose a reason for hiding this comment

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

The alternative would be that it's only ever logged when we're at trace everywhere, which I don't think fixes the issue of these being visible during normal operation.

Copy link
Contributor

Choose a reason for hiding this comment

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

fair point, not sure how to solve that then :(

Copy link
Member Author

Choose a reason for hiding this comment

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

Have people thought much about appropriate log levels for libraries? We could change tower-limit to warn here, but I'm not sure that's something everyone would want.

Copy link
Contributor

Choose a reason for hiding this comment

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

@hawkw any thoughts?

]
.join(",")
.to_string()
Expand Down