Repository navigation
promql[nhcb]: nhcb as classic histogram feature flag - #18048
Conversation
f3f9b03 to
f2271a6
Compare
|
Note: I really need to get through my old review backlog. I don't think I'm urgently required on this one. I'll queue it for review, but it will take time to get to it. Please don't wait for me. (And if you think you really depend on me here, let me know.) |
krajorama
left a comment
There was a problem hiding this comment.
Hi, thank you for this, this is looking promising.
Please add some documentation for the feature flag.
Do I understand correctly that it has the limitation that if we are in some migration state where some classic histograms are still there, but others are not, we might end up not returning all data?
E.g. let's suppose you have two classic histogam metrics, you stop scraping one of them. The code in (q *NHCBAsClassicQuerier) Select will see that there are some results for classic histograms and return that, meaning that the other metric isn't considered and will be missing from the result even if it has an NHCB version.
The other thing I'm wondering about if it has some unintended interaction with other parts of PromQL, for example the delayed name removal. Since we're effectively changing the metric name we're looking up. I would hope not, but something to check.
|
Amazing! Thanks 💪🏽 @rbizos - do you want to call-in into some 30m sync around this with @MichaHoffmann ? |
|
Related to #16948 |
61156e2 to
f689942
Compare
|
FYI: Testing it out, planning to create a small demo for KubeCon (: |
|
Nice :) I would have gladly joined |
|
Interactive demo for KubeCon: #18339 |
|
I only heard positive feedback about this (e.g. @ArthurSens @jan--f, our talk audience, also Cortex folks from Apple). The only downsides came from @beorn7 @krajorama around demotivating users to actually change queries (there are AI SKILL.md for this being built) with this feature. Then from @krajorama around scale risk and TCO for LTS projects.
Anything else to do? Probably some test coverage and documentation (also rebase). I'd expand this for native histograms too, but it can be negotiated later on (: |
|
Is there a plan if and how we could deprecate and eventually remove the old histograms? That could perhaps inform how long a feature as proposed here would stick around? |
|
I understand fully the migration demotivation and having an intermediary step feels like some people might stop there. But not supporting the bucket syntax feels like a big breaking change (could this be like in Prometheus 4 ?) |
e33d659 to
f7ed5f1
Compare
Signed-off-by: Raphael Bizos <[email protected]>
f7ed5f1 to
7033fc7
Compare
|
@bwplotka This should be ready to review as we discussed earlier, I merged main from upstream, added collision tests (that demonstrate for some need to be implemented) and renamed everything from NHCB to NativeHistogram for futurproofness. The failing test is a timeout and is unrelated |
bwplotka
left a comment
There was a problem hiding this comment.
Looks good, thanks!
Some initial comments 💪🏽
Co-authored-by: Bartlomiej Plotka <[email protected]> Signed-off-by: rbizos <[email protected]>
Signed-off-by: Raphael Bizos <[email protected]>
Signed-off-by: Raphael Bizos <[email protected]>
i.e. __name__="_sum" also simplified the base metric extraction to drop unreachable error cod Signed-off-by: Raphael Bizos <[email protected]>
Co-authored-by: Bartlomiej Plotka <[email protected]> Signed-off-by: rbizos <[email protected]>
Co-authored-by: Bartlomiej Plotka <[email protected]> Signed-off-by: rbizos <[email protected]>
Signed-off-by: Raphael Bizos <[email protected]>
dab344e to
a21c860
Compare
This would just push the switch nhcb.(type) to the calling side and add inconsistancy with the rest of the files functions This reverts commit e3ee095. Signed-off-by: Raphael Bizos <[email protected]>
Signed-off-by: Raphael Bizos <[email protected]>
Signed-off-by: Raphael Bizos <[email protected]>
Signed-off-by: Raphael Bizos <[email protected]>
Signed-off-by: Raphael Bizos <[email protected]>
Signed-off-by: Raphael Bizos <[email protected]>
e58f639 to
191fc5f
Compare
…ograms_compat_layer Signed-off-by: Raphael Bizos <[email protected]>
bwplotka
left a comment
There was a problem hiding this comment.
Looks good to me! 💪🏽
Thanks for this first iteration - one nit and good to go
Co-authored-by: Bartlomiej Plotka <[email protected]> Signed-off-by: rbizos <[email protected]>
Signed-off-by: r.bizos <[email protected]>
this allows to query nhcb with _buckets, _sum or _count suffix and get classic histograms
Which issue(s) does the PR fix:
#16948
Does this PR introduce a user-facing change?
What does this PR introduces
This PR adds a feature flag
promq-nhcb-as-classicthat will allow to query NHCH as directly with the different prefixes (_bucket, _sum, _count)Example
The following example is running with the following command
./prometheus --config.file prometheus.yml --enable-feature=promq-nhcb-as-classicAnd a global config like such:
We can query normally a NHCB:

We can then query it as a classic histogram by adding the _bucket prefix (or any of the 2 other prefix)