feat: hide __aggregated_metric__ in /series and /labels - #14677
Conversation
| return nil, err | ||
| } | ||
|
|
||
| if t.Cfg.Pattern.MetricAggregation.Enabled { |
There was a problem hiding this comment.
This works if running Loki all-in-one or sharing a config file, but I don't think it will work if the pattern-ingester and querier are running as separate components and this cfg is set using a flag on the pattern-ingester so the querier doesn't see it
There was a problem hiding this comment.
True, but since we already follow this pattern in many other places I think we've already created a dependency on a shared config file.
- We check bloom gateway config in the index gateway
- We already check pattern config in the querier
- We check ingester config in the querier
Would your preference be we specify -querier.metric_aggregation_enabled as a command line flag as well (as opposed to hiding it)?
|
I'm closing this for now, we'll see if we want it again in the future |
|
and it's come up again 😺 |
hides unless explictly requested
bc95f88 to
b90f4d2
Compare
svennergr
left a comment
There was a problem hiding this comment.
I think we used the presence of a __aggregated_metric__ label as the indicator that we can use aggregated metrics. How would we do that in the future? Just rely on the feature flag?
cc @gtk-grafana
|
@svennergr could you point me to code, do you know if we search explicitly for that label vs just hitting Relying on the feature flag seems reasonable to me as well. |
I think I'm working too much with LLMs nowadays. I hallucinated - we don't look for that in |
What this PR does / why we need it:
This PR removes
{__aggregated_metric=~".+"}streams from the/seriesendpoint, unless an__aggregated_metric__matcher is explicitly requested. It does the same for/labels, so__aggregated_metric__will not appear in a/labelsresponse, but you can still request/labels/__aggregated_metric__/values.This will alleviate confusion for people using a tool like
logcli series --analyze-labelsfor cardinatlity analysis.Special notes for your reviewer:
Checklist
CONTRIBUTING.mdguide (required)featPRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.docs/sources/setup/upgrade/_index.mddeprecated-config.yamlanddeleted-config.yamlfiles respectively in thetools/deprecated-config-checkerdirectory. Example PR