SIGN IN SIGN UP

feat(observability): Add rate limited debug messages (#971)

* feat(observability): Add rate limited debug messages

This PR contains three major code changes:

- Update all of our tracing dependencies to the latest
versions.
- Update `tracing-limit` to use `tracing_subscriber`'s
`Layer` trait.
- Intrument the main code base with rate limited tracing
events.

This change introduces the ability for tracing events to be
rate limited. The primary reason for including this is for
events that may be important for a user to see but may arrive
in large bursts. This can cause issues around saturating IO and
in general making it difficult to diagnose the issue.

The solution is to allow tracing events to provide a
`rate_limit_secs` attribute that specifies a window at which
we will only see one log and the rest will be counted. This
enables users to know that this event is being recorded but
will not flood their view into vector.

```rust
 INFO basic: hello, world! count=0 rate_limit_secs=5
TRACE basic: this field is not rate limited!
 INFO basic: "hello, world!" is being rate limited. rate_limit_secs=5
TRACE basic: this field is not rate limited!
TRACE basic: this field is not rate limited!
TRACE basic: this field is not rate limited!
TRACE basic: this field is not rate limited!
 INFO basic: 5 "hello, world!" events were rate limited. rate_limit_secs=5
```

Closes #806
Related to #970

Signed-off-by: Lucio Franco <luciofranco14@gmail.com>
L
Lucio Franco committed
b541bb1a4097d22f3efa9d74ccaf28cabcbe6466
Parent: 476fb7e
Committed by GitHub <noreply@github.com> on 10/8/2019, 10:21:36 PM