Skip to content

extend hotblocks metrics with client information#63

Open
tmcgroul wants to merge 1 commit intomasterfrom
hotblocks-metrics
Open

extend hotblocks metrics with client information#63
tmcgroul wants to merge 1 commit intomasterfrom
hotblocks-metrics

Conversation

@tmcgroul
Copy link
Copy Markdown
Contributor

this pr extends existing metrics with information about client. in order to use it client should add x-client-id header

@tmcgroul tmcgroul requested a review from kalabukdima March 30, 2026 18:09

let client_id = req
.headers()
.get("x-client-id")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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(|| {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why was this one not broken down by dataset?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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?

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