Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tenant metrics #135

Merged
merged 4 commits into from
Dec 18, 2018
Merged

Tenant metrics #135

merged 4 commits into from
Dec 18, 2018

Conversation

gouthamve
Copy link
Member

Added the easiest write metrics for #103

Signed-off-by: Goutham Veeramachaneni <[email protected]>
Signed-off-by: Goutham Veeramachaneni <[email protected]>
@gouthamve gouthamve requested a review from tomwilkie December 17, 2018 07:32
Namespace: "loki",
Name: "distributor_bytes_received_total",
Help: "The total number of uncompressed bytes received per user",
}, []string{"org"})
Copy link
Contributor

Choose a reason for hiding this comment

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

In cortex we used "user"[0]; in Loki we seem to be converging on the terms "instance" and "tenant".

[0] https://github.com/cortexproject/cortex/blob/master/pkg/distributor/distributor.go#L50

Copy link
Member Author

Choose a reason for hiding this comment

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

Should I just run with tenant then? See: #131

Copy link
Contributor

Choose a reason for hiding this comment

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

Instance is preferred I'd say; tenant is used in docs/presentations, but thats about it.

Signed-off-by: Goutham Veeramachaneni <[email protected]>
@gouthamve
Copy link
Member Author

@tomwilkie PTAL

@negbie
Copy link
Contributor

negbie commented Dec 17, 2018

@gouthamve

shouldn't
bytesIngested.WithLabelValues(userID).Add(float64(bytesCount))
inesIngested.WithLabelValues(userID).Add(float64(lineCount))

be
bytesIngested.WithLabelValues(ingester.Addr).Add(float64(bytesCount))
inesIngested.WithLabelValues(ingester.Addr).Add(float64(lineCount))

@negbie
Copy link
Contributor

negbie commented Dec 17, 2018

You could move the metrics to func sendSamplesErr. One advantage would be there is already a loop over streams and you can use ingester.Addr

@gouthamve
Copy link
Member Author

Ah, we want to track the lines ingested per user and not per ingester. And when Prometheus scrapes these metrics, it automatically adds the ingester address as a labels so we can see how much each ingester is getting too.

Usage has been removed as part of perf-optimisation:
cortexproject/cortex@3006e39#diff-180f56d9aaf5a9aa079e6fc9cfcf1bc8L365

Signed-off-by: Goutham Veeramachaneni <[email protected]>
@gouthamve gouthamve merged commit 7bcdf0e into grafana:master Dec 18, 2018
@gouthamve gouthamve deleted the tenant-metrics branch December 18, 2018 11:55
xperimental pushed a commit to xperimental/loki that referenced this pull request Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants