Skip to content

[DO NOT MERGE] Interactive demo for PromQL histogram compatibility layer (promql-nhcb-as-classic) - #18339

Closed
bwplotka wants to merge 11 commits into
mainfrom
demo-histcompat
Closed

bwplotka wants to merge 11 commits into
mainfrom
demo-histcompat

Conversation

@bwplotka

@bwplotka bwplotka commented Mar 23, 2026 •

Copy link
Copy Markdown
Member

Demo of #18048 for Prometheus booth and https://sched.co/2EF4F

Depends on #18048

// Demo setup
//
//   - Start Prom:
//     go test -tags demo -run "TestMain_PromQLCompatDemo/normal" ./cmd/prometheus/... # Will run forever and open 3 browser tabs (localhost:1234)
//
//   - In another terminal, start Prom with compatibility flag on:
//     go test -tags demo -run "TestMain_PromQLCompatDemo/compatibility" ./cmd/prometheus/...  # Will run forever and open 3 browser tabs (localhost:1235)

Without flag

image

With flag

image

Does this PR introduce a user-facing change?

NONE

rbizos and others added 10 commits February 9, 2026 17:11
this allows to query nhcb with _buckets, _sum or _count suffix and get
classic histograms

Signed-off-by: Raphael Bizos <[email protected]>
Signed-off-by: r.bizos <[email protected]>
Signed-off-by: Raphael Bizos <[email protected]>
This allows to preserve ordering and thus having sorted output

Signed-off-by: Raphael Bizos <[email protected]>
fixing lint as well

Signed-off-by: Raphael Bizos <[email protected]>
Signed-off-by: bwplotka <[email protected]>
Signed-off-by: bwplotka <[email protected]>
@bwplotka bwplotka changed the title [DO NOT MERGE] KubeConEU 2026 demo for PromQL histogram compatibility layer (promql-nhcb-as-classic) [DO NOT MERGE] Interactive demo for PromQL histogram compatibility layer (promql-nhcb-as-classic) Mar 23, 2026
Signed-off-by: bwplotka <[email protected]>
@github-actions github-actions Bot added the stale label May 22, 2026
@bwplotka bwplotka closed this Sep 25, 2026
bwplotka added a commit to bwplotka/prometheus that referenced this pull request Sep 26, 2026
Runs Prometheus with --enable-feature=promql-nh-classic-compat on
localhost:1234, scraping itself with 4 jobs, each storing its
prometheus_http_request_duration_seconds histogram differently:

  - job="classic": classic histogram only.
  - job="nhcb": NHCB only.
  - job="native": exponential native histogram only.
  - job="classic-and-native": both classic and exponential native histogram.

It opens browser tabs comparing classic and native histogram queries.

Similar to the demo in prometheus#18339. Not meant to be merged.

Signed-off-by: Bartek Plotka <[email protected]>
bwplotka added a commit to bwplotka/prometheus that referenced this pull request Sep 27, 2026
…conversion

Runs Prometheus with --enable-feature=promql-histogram-conversion and
--query.convert-histograms-from=nhcb,nhe,classic on localhost:1234, scraping
itself with 4 jobs, each storing its prometheus_http_request_duration_seconds
histogram differently:

  - job="classic": classic histogram only.
  - job="nhcb": NHCB only.
  - job="native": exponential native histogram only.
  - job="classic-and-native": both classic and exponential native histogram.

It opens browser tabs comparing classic and native histogram queries: what is
stored (conversion off, with __debug_stored_as__="true"), rates and quantiles
with the conversion on, and the buckets, including the le="0.1" quirk of
exponential histograms.

Similar to the demo in prometheus#18339. Not meant to be merged.

Signed-off-by: Bartek Plotka <[email protected]>
bwplotka added a commit to bwplotka/prometheus that referenced this pull request Sep 27, 2026
…conversion

Runs Prometheus with --enable-feature=promql-histogram-conversion and
--query.convert-histograms-from=nhcb,nhe,classic on localhost:1234, scraping
itself with 4 jobs, each storing its prometheus_http_request_duration_seconds
histogram differently:

  - job="classic": classic histogram only.
  - job="nhcb": NHCB only.
  - job="native": exponential native histogram only.
  - job="classic-and-native": both classic and exponential native histogram.

It opens browser tabs comparing classic and native histogram queries: what is
stored (conversion off, with __debug_stored_as__="true"), rates and quantiles
with the conversion on, and the buckets, including the le="0.1" quirk of
exponential histograms.

Similar to the demo in prometheus#18339. Not meant to be merged.

Signed-off-by: Bartek Plotka <[email protected]>
bwplotka added a commit to bwplotka/prometheus that referenced this pull request Oct 1, 2026
…conversion

Runs Prometheus with --enable-feature=promql-histogram-conversion and
--query.convert-histograms-from=nhcb,nhe,classic on localhost:1234, scraping
itself with 4 jobs, each storing its prometheus_http_request_duration_seconds
histogram differently:

  - job="classic": classic histogram only.
  - job="nhcb": NHCB only.
  - job="native": exponential native histogram only.
  - job="classic-and-native": both classic and exponential native histogram.

It opens browser tabs comparing classic and native histogram queries: what is
stored (conversion off, with __debug_stored_as__="true"), rates and quantiles
with the conversion on, and the buckets, including the le="0.1" quirk of
exponential histograms.

Similar to the demo in prometheus#18339. Not meant to be merged.

Signed-off-by: Bartek Plotka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants