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

Add metrics support for downloaded file counts by type (per domain) #5815

Closed
jlsherrill opened this issue Sep 19, 2024 · 3 comments
Closed
Labels

Comments

@jlsherrill
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Currently the only consumption metrics emitted by the content app is that of bytes requested by clients (by domain). This is helpful for cost purposes, but isn't super helpful for determining usage.

For the RPM side, it would be more helpful to be able to know the count of RPM files that are downloaded. For this we would need to differentiate the files by type. I imagine just using the file extension should be sufficient for this case, identifying it by the 'content type' is not needed.

Describe the solution you'd like

currently you can query the size via:

sum by(domain_name) (rate(pulp_artifacts_size_counter_Bytes_total[2m]) * 60)

I would imagine being able to query the counts with something like:

sum by(domain_name) (rate(pulp_artifacts_counter_total{filetype="rpm"}[2m]))
sum by(domain_name) (rate(pulp_artifacts_counter_total{filetype="gz"}[2m]))
sum by(domain_name) (rate(pulp_artifacts_counter_total{filetype="xml"}[2m]))

Describe alternatives you've considered

Additional context

@jlsherrill jlsherrill changed the title Add metrics support for downloaded files by type (per domain) Add metrics support for downloaded file counts by type (per domain) Oct 7, 2024
@decko
Copy link
Member

decko commented Oct 15, 2024

We're gonna need a new metric for this

@decko
Copy link
Member

decko commented Oct 15, 2024

Maybe, just a maybe, we could use a histogram here.
It generates buckets, counts and sums automatically.

@lubosmj
Copy link
Member

lubosmj commented Oct 28, 2024

We have begun visualizing this in our dashboard using access logs, based on the assumption that this data type does not require constant monitoring as a dedicated metric. Additionally, the large variety of file types presents a risk of causing a cardinality explosion.

image

@lubosmj lubosmj closed this as completed Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants