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

metrics name truncated #4

Closed
yiyijin opened this issue Feb 24, 2020 · 5 comments · Fixed by #5
Closed

metrics name truncated #4

yiyijin opened this issue Feb 24, 2020 · 5 comments · Fixed by #5

Comments

@yiyijin
Copy link

yiyijin commented Feb 24, 2020

We are using opencensus to collect metrics from the application, which uses oc-agent and oc-collector to send to prometheus.

I have noticed that the metrics name gets truncated if the number of chars is greater than 100, after looking at the code, it looks like:

const labelKeySizeLimit = 100

is causing the issue.

I just wonder any reason for this restriction? is there anyway that we can make it configurable?

@odeke-em
Copy link
Member

Hello there @yiyijin! Thanks for filing this issue.

If I recall correctly from 2017/2019, this is to protect and high cardinality labels as the limit for label key names by OpenCensus or Stackdriver, but indeed it truncates long names.

Since Prometheus doesn't seem to have a limit, perhaps we can/could remove this limit?

@yiyijin
Copy link
Author

yiyijin commented Feb 24, 2020

@odeke-em Thanks a lot for the reply! I think it will be good to remove this limitations, or make it configurable at least, I just wonder do we have an estimate for this change? Thanks a lot!

@odeke-em
Copy link
Member

Looks like Christmas came early for you @yiyijin :) I've mailed out PR #5 which I shall merge in shortly then make a release. I'll then make a PR to the OpenCensus Agent and after that is made, you'll be on your way to using it without truncation.

@yiyijin
Copy link
Author

yiyijin commented Feb 25, 2020

Thanks a lot!

@odeke-em
Copy link
Member

odeke-em commented Feb 25, 2020 via email

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 a pull request may close this issue.

2 participants