extend hotblocks metrics with client information#63
Conversation
part of NET-68
|
|
||
| let client_id = req | ||
| .headers() | ||
| .get("x-client-id") |
There was a problem hiding this comment.
I think "x-" prefixes are deprecated now:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers
https://www.keycdn.com/support/custom-http-headers#naming-conventions
I suggest using just "client-id"
There was a problem hiding this comment.
we already have a few headers that are prefixed with x-sqd-: x-sqd-finalized-head-number, x-sqd-finalized-head-hash etc. would it be better to change it to x-sqd-client-id or you insist on client-id?
| LazyLock::new(|| Family::new_with_constructor(|| Histogram::new(buckets(1., 20)))); | ||
| pub static STREAM_BYTES_PER_SECOND: LazyLock<Histogram> = | ||
| LazyLock::new(|| Histogram::new(exponential_buckets(100., 3.0, 20))); | ||
| pub static STREAM_BYTES_PER_SECOND: LazyLock<Family<Labels, Histogram>> = LazyLock::new(|| { |
There was a problem hiding this comment.
Why was this one not broken down by dataset?
There was a problem hiding this comment.
maybe it wasn't required 🤷♂️
now i am wondering if it will break existing chart that uses hotblocks_stream_bytes_per_second_bucket metric. should i revert this change back?
this pr extends existing metrics with information about client. in order to use it client should add
x-client-idheader