-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Histogram field type is not compatible with the prometheus histograms #99820
Comments
Pinging @elastic/es-analytics-geo (Team:Analytics) |
As you can see from the example the first bucket is the counts for values whose value is less then or equal to 0. If I understand correctly the way you decided to handle negative bucket values you should accumulate the counts from the first two buckets so to have
Anyway this should overflow anyway because our histogram type supports |
not sure why are you referring to the
there is no negative buckets.
sorry, I didn't understand this, each element of
so the documentation is not correct saying that |
Histograms currently use integers to store the count of each value, which can overflow. Switch to using long integers to avoid this. TDigestState was updated to use long for centroid value count in elastic#99491 Fixes elastic#99820
Hey @kkrik-es is there any reason to not use an |
I believe we already check programmatically that |
Elasticsearch is written in Java...and unfortunately Java does not have unsigned types (unless we do something special to treat signed numbers as unsigned). |
I was referring to this page - https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html#number and as I see |
* Represent histogram value count as long Histograms currently use integers to store the count of each value, which can overflow. Switch to using long integers to avoid this. TDigestState was updated to use long for centroid value count in #99491 Fixes #99820 * Update docs/changelog/99912.yaml * spotless fix
Kindly note that the submitted fix merely addresses the shortcoming of ES histograms with regard to supporting large count values per inserted point. Other incompatibilities with Prom histograms, e.g. around the use of cumulative values and different internal implementation for percentiles, persist. |
* Represent histogram value count as long Histograms currently use integers to store the count of each value, which can overflow. Switch to using long integers to avoid this. TDigestState was updated to use long for centroid value count in elastic#99491 Fixes elastic#99820 * Update docs/changelog/99912.yaml * spotless fix
* Represent histogram value count as long Histograms currently use integers to store the count of each value, which can overflow. Switch to using long integers to avoid this. TDigestState was updated to use long for centroid value count in elastic#99491 Fixes elastic#99820 * Update docs/changelog/99912.yaml * spotless fix
Prometheus histograms are transformed to the Elasticsearch histograms using
PromHistogramToES
counts
array is composed by undoing counters accumulation for each bucket.But anyway there still might happen situation when difference between two long values doesn’t fit into elasticsearch counts type - int, that cause such error:
and the document will be dropped.
Full message:
the problem is with the first value (I’ve checked other dropped events - there is the same behavior)
The text was updated successfully, but these errors were encountered: