Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upPromQL cleanup for 2.0 #3060
Comments
brian-brazil
added
component/promql
kind/cleanup
priority/Pmaybe
labels
Aug 11, 2017
This comment has been minimized.
This comment has been minimized.
|
I proposed dropping most of our log customization options as they can generally be solved outside of Prometheus and are just bloat for us: https://groups.google.com/forum/#!topic/prometheus-developers/Dc2wRMyhqlE |
brian-brazil
added this to the v2.x milestone
Aug 11, 2017
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
|
On 11 August 2017 at 15:35, Brian Brazil ***@***.***> wrote:
delta. Discussed previously on #1772
<#1772> with no strong
conclusion. I still have yet to see any valid uses cases, and it remains an
attractive nuisance with users regularly using it inappropriately.
I found the conclusion in #1772 convincing and strong. (But it was my own
one, so I'm biased… But honestly, when the discussion started back then, I
was indifferent, but at the end of the discussion, I was convinced we need
delta.) Nothing has changed that I would see as a reason to revise the
decision.
1. keep_common. I don't think anyone is really using it, and it has
semantic issues as you don't know what labels will come out the other end.
There are five uses in the SoundCloud code base, but they could all be
better implemented with without.
drop_common_labels. This does seem to be used occasionally for display
purposes. It has the same semantic issues as keep_common, so I wouldn't
mind removing it.
This is not used at all at SoundCloud. Personally, I woldn’t mind about
removing it, either.
1. count_scalar. Use cases are better handled by absent() or correct
propagation of labels in operations.
I have seen many users being confused by count returning an empty vector
rather than a vector with a single 0 element. (It takes a while to
understand why that would be inconsistent.) However, none of them has
reverted to count_scalar (but used absent instead). Consequently,
count_scalar is not used in the SoundCloud code base.
--
Björn Rabenstein, Engineer
http://soundcloud.com/brabenstein
SoundCloud Ltd. | Rheinsberger Str. 76/77, 10115 Berlin, Germany
Managing Director: Alexander Ljung | Incorporated in England & Wales with
Company No. 6343600 | Local Branch Office | AG Charlottenburg | HRB 110657B
|
This comment has been minimized.
This comment has been minimized.
The conclusion in #1772 was that there was no conclusion. In relation to your last set of points, for the third the behaviour is the same for both On the other 3 proposals, I take it you're in favour. |
This comment has been minimized.
This comment has been minimized.
|
I think the last discussion on delta was quite elaborate and both sides have read and semantically processed the arguments of the other. |
This comment has been minimized.
This comment has been minimized.
I'd disagree on this point. Users are pretty consistently abusing it, such as using it on counters. |
This comment has been minimized.
This comment has been minimized.
Not to the point where I find it enough to justify going against @beorn7's strong and certainly valid objections. I really think we have to agree to disagree on this one, just like we did with the Just realized that issue was only about PromQL. Just ignore my first comment on this :) |
brian-brazil
added a commit
that referenced
this issue
Oct 5, 2017
brian-brazil
added a commit
that referenced
this issue
Oct 5, 2017
brian-brazil
added a commit
that referenced
this issue
Oct 5, 2017
brian-brazil
added a commit
that referenced
this issue
Oct 5, 2017
This comment has been minimized.
This comment has been minimized.
flyingmutant
commented
Oct 17, 2017
|
Can you please explain what should be used instead of |
brian-brazil
closed this
Oct 18, 2017
This comment has been minimized.
This comment has been minimized.
flyingmutant
commented
Oct 18, 2017
|
@brian-brazil should I open a separate issue to get an actual answer? While |
grobie
referenced this issue
Oct 19, 2017
Closed
drop_common_labels reported as unknown function #3320
AlekSi
referenced this issue
Nov 22, 2017
Merged
PMM-1676 Parse error in Grafana dashboards due to removed count_scalar #71
This comment has been minimized.
This comment has been minimized.
huangll
commented
Jan 24, 2018
|
I try to use function histogram_quatile in consule; but it alaways : "no data". functions like this: |
This comment has been minimized.
This comment has been minimized.
civik
commented
Jun 13, 2018
|
@brian-brazil Is there any best practice replacement for |
This comment has been minimized.
This comment has been minimized.
|
The intended way to handle garbage labels is to remove them in either the target, service discovery, or relabelling that is introducing them. |
This comment has been minimized.
This comment has been minimized.
civik
commented
Jun 13, 2018
•
|
Yes, that is the 'intended' way. The problem is that the labels might very much be needed, but is not relevant to query output and thus become 'garbage' or maybe a better term 'redundant.' Take this fictional metric: Now I want to make a table visualization of this metric with a query like it will return ALL the labels of the matching query, many of which are redundant now that the data has been filtered. If I'm making a table of "Pod Restarts For SooperFunApp in East DC" its now redundant to have the For better or worse d_c_l() was a pretty effective tool to deal with these situations. |
This comment has been minimized.
This comment has been minimized.
|
That sounds like a feature request for Grafana. |
This comment has been minimized.
This comment has been minimized.
civik
commented
Jun 13, 2018
|
They'll tell me to make Prometheus fix it. Anyway, this is just been something my users have been telling me so I thought I would push the feedback up. Thanks! |
This comment has been minimized.
This comment has been minimized.
|
@civik One problem with |
This comment has been minimized.
This comment has been minimized.
flyingmutant
commented
Jun 14, 2018
This comment has been minimized.
This comment has been minimized.
kfdm
commented
Jun 14, 2018
|
I believe you should generally use the "Legend Format" on Grafana |
This comment has been minimized.
This comment has been minimized.
|
Yep. |
This comment has been minimized.
This comment has been minimized.
civik
commented
Jun 14, 2018
|
@juliusv I'm not implying that @kfdm Nope that only controls the legend naming. The problem is that every Grafana panel is basically its own 'subapp' and they often times behave very differently. In a case of a graph this problem doesn't really exist because the graph panel is only interested in the values, and the labels just become part of the legend. However in other panels, like the table panel that I mentioned above assumes that every label should get its own column. @flyingmutant I have discovered a slightly hacky way to drop lables by using aggregation operators. like |
This comment has been minimized.
This comment has been minimized.
civik
commented
Jun 14, 2018
|
Super simple solution would be to allow the |
This comment has been minimized.
This comment has been minimized.
|
I see, yeah, for Grafana tables the legend format doesn't help.
A clunkier variant of explicitly removing a label would be So that's not as automatic as |
This comment has been minimized.
This comment has been minimized.
civik
commented
Jun 18, 2018
|
|
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 22, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
brian-brazil commentedAug 11, 2017
Considering we're allowed breaking changes to PromQL for 2.0, I'd like us to consider removing the following:
delta. Discussed previously on #1772 with no strong conclusion. I still have yet to see any valid uses cases, and it remains an attractive nuisance with users regularly using it inappropriately.
keep_common. I don't think anyone is really using it, and it has semantic issues as you don't know what labels will come out the other end.
drop_common_labels. This does seem to be used occasionally for display purposes. It has the same semantic issues as keep_common, so I wouldn't mind removing it.
count_scalar. Use cases are better handled by absent() or correct propagation of labels in operations.
What do others think?