Skip to content

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

Merged
lukesteensen merged 1 commit intomasterfrom
log-rate-limits
Nov 6, 2019
Merged

fix(observability): ensure internal rate limiting is logged#1151
lukesteensen merged 1 commit intomasterfrom
log-rate-limits

Conversation

@lukesteensen
Copy link
Member

Closes #841

Tested locally and works as expected.

Closes #841

Signed-off-by: Luke Steensen <luke.steensen@gmail.com>
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?

@lukesteensen
Copy link
Member Author

I'm going to merge for now so we get the functionality, but we can continue the discussion and revisit if we come up with something better.

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.

Log rate limit errors, internal and external

2 participants