Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Support from/to in tag/terms #1993

Merged
merged 2 commits into from
Jul 7, 2021
Merged

Conversation

shanson7
Copy link
Collaborator

@shanson7 shanson7 commented Jul 1, 2021

This will allow us to externally determine how many series exist in a given time window for a particular query. Our use case is for external pruning based on an application tag namespace. For example, if we say that namespace=productA is allowed 100,000 series, we can determine how many days of indexed series they would be allowed to keep.

@@ -192,6 +192,8 @@ type GraphiteTagDelByQueryResp struct {
type GraphiteTagTerms struct {
Tags []string `json:"tags"`
Expr []string `json:"expressions"`
From int64 `json:"from" form:"from"`
To int64 `json:"to" form:"to"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need these form directives?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe they are the same as the default.

Copy link
Contributor

@Dieterbe Dieterbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like "/tag/terms" is something that we offer that graphite doesn't, so no worries there.
the query already supports the parameters, so exposing them through the api seems very reasonable

@Dieterbe Dieterbe merged commit 8626886 into grafana:master Jul 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants