Repository navigation
Conversation
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: 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]>
Signed-off-by: Raphael Bizos <[email protected]>
fixing lint as well Signed-off-by: Raphael Bizos <[email protected]>
Signed-off-by: Raphael Bizos <[email protected]>
fixing typo on feature flag name Co-authored-by: Bartlomiej Plotka <[email protected]> Signed-off-by: rbizos <[email protected]>
Signed-off-by: Raphael Bizos <[email protected]>
Performance improvements - added a cache to not create the labels per samble but rather per serie - use hash rather than label.String in the converter - only convert _sum/_buckets/_count when needed (this significantly improved the _count/sum as buckets are the most expensive and were built each time) Signed-off-by: Raphael Bizos <[email protected]>
the typo was fixed on the code but not in the docs Signed-off-by: Raphael Bizos <[email protected]>
Signed-off-by: Raphael Bizos <[email protected]>
- Stream classicSet and nhcbSet one NHCB series at a time in NHCBAsClassicQuerier instead of buffering all classic and converted NHCB series up front. - Reuse ClassicSeriesCache formatted le strings, metric names, and positiveBuckets scratch buffer across series of the same metric while invalidating cached label sets when the full label set changes. - Reuse per-bucket sample scratch slices in classicSeriesBuilder and pack converted fSampleSeries and fSample slices into two contiguous slabs per NHCB series. Signed-off-by: Bartek Plotka <[email protected]>
Signed-off-by: Bartek Plotka <[email protected]>
…ut changes Signed-off-by: Bartek Plotka <[email protected]>
…ng SeriesSet Signed-off-by: Bartek Plotka <[email protected]>
perf(storage): stream NHCB to classic conversion and reduce allocations
…anout leg Signed-off-by: Bartek Plotka <[email protected]>
bwplotka
force-pushed
the
bwplotka/pr-18048-nhe-label-control
branch
3 times, most recently
from
October 3, 2026 21:01
c64f303 to
bdab911
Compare
promql: apply NHCB-as-classic conversion in the engine instead of a fanout leg
…icQuerier Group stored classic and converted NHCB series by histogram identity (labels excluding __name__ and le) when both representations exist, while keeping pure NHCB SeriesSets streaming lazily one NHCB series at a time: - Stored classic samples take precedence at matching timestamps, shadowing converted NHCB buckets across the group even when bucket layouts or le formatting differ. - Disjoint time ranges across a migration cutover merge into a single continuous series, with staleness markers handled per representation. - NHCB staleness markers, dropped custom buckets, and classic takeover timestamps emit StaleNaN on active converted series. - Series are sorted by labels.Compare (per group when sortSeries=false, globally when sortSeries=true). Signed-off-by: Bartek Plotka <[email protected]>
Signed-off-by: Bartek Plotka <[email protected]>
Signed-off-by: Bartek Plotka <[email protected]>
Signed-off-by: Bartek Plotka <[email protected]>
Signed-off-by: Bartek Plotka <[email protected]>
…llisions in NHCBAsClassicQuerier - Ignore stored _bucket series without an le label when collecting classic bucket timestamps so a gauge/counter ending in _bucket does not shadow converted NHCB buckets. - Lazily collect classic timestamps using a dedicated classicIt iterator only when an actual NHCB sample is encountered, avoiding unnecessary chunk scans when a float counter or exponential native histogram shares the base metric name. - Mark active converted NHCB series stale if the base series transitions to a float sample (ValFloat). Signed-off-by: Bartek Plotka <[email protected]>
Signed-off-by: Bartek Plotka <[email protected]>
Signed-off-by: Bartek Plotka <[email protected]>
Signed-off-by: Bartek Plotka <[email protected]>
bwplotka
force-pushed
the
bwplotka/pr-18048-nhe-label-control
branch
from
October 4, 2026 12:13
bdab911 to
b1142e1
Compare
bwplotka
force-pushed
the
bwplotka/pr-18048-nhe-label-control
branch
2 times, most recently
from
October 6, 2026 05:24
75db62a to
8fd6547
Compare
bwplotka
changed the base branch from
bwplotka/pr-18048-nhe-as-classic
to
bwplotka/pr-18048-resolve-collisions
October 6, 2026 05:24
…bug label
Allow overriding --enable-feature=promql-nhcb-as-classic per selector via the __opt_classic_from control label ('nhcb', 'none', 'debug') and expose the underlying storage encoding via __stored_as__ ('classic', 'nhcb') when debug is matched.
Unconditionally strip all __opt_* matchers on the PromQL engine path (Select and absent()/absent_over_time()) even when --enable-feature=promql-nhcb-as-classic is disabled so queries containing __opt_classic_from remain rollback-safe.
Signed-off-by: Bartek Plotka <[email protected]>
bwplotka
force-pushed
the
bwplotka/pr-18048-nhe-label-control
branch
from
October 6, 2026 05:30
8fd6547 to
41f5d92
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on top of:
Add per-selector control over NHCB-to-classic histogram conversion via the reserved
__opt_classic_frommatcher and optional__stored_as__provenance output label:__opt_classic_from="nhcb"(or!="none", default when--enable-feature=promql-nhcb-as-classicis set) converts NHCB histograms to classic series.__opt_classic_from="none"(or="",!="nhcb",!~"nhcb") disables conversion and returns stored classic series only.__opt_classic_from="debug"(or=~"nhcb|debug") enables conversion and attaches__stored_as__="classic"or__stored_as__="nhcb"to returned series without merging or shadowing.__opt_*matcher is stripped unconditionally on the PromQL engine path (Selectandabsent()/absent_over_time()) even when--enable-feature=promql-nhcb-as-classicis disabled, so rolling back the feature flag does not break queries containing__opt_classic_from.