-
Notifications
You must be signed in to change notification settings - Fork 228
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
feat(core): OTel Exponential Histograms #1879
feat(core): OTel Exponential Histograms #1879
Conversation
memory/src/main/scala/filodb.memory/format/vectors/Histogram.scala
Outdated
Show resolved
Hide resolved
memory/src/main/scala/filodb.memory/format/vectors/Histogram.scala
Outdated
Show resolved
Hide resolved
memory/src/main/scala/filodb.memory/format/vectors/Histogram.scala
Outdated
Show resolved
Hide resolved
memory/src/main/scala/filodb.memory/format/vectors/Histogram.scala
Outdated
Show resolved
Hide resolved
memory/src/main/scala/filodb.memory/format/vectors/HistogramVector.scala
Outdated
Show resolved
Hide resolved
memory/src/main/scala/filodb.memory/format/vectors/HistogramVector.scala
Outdated
Show resolved
Hide resolved
41fa627
to
5dce636
Compare
af7d743
to
246e381
Compare
val b = it.next() | ||
val zeroBucket = (b == 0) | ||
val bucketUpper = bucketTop(b) | ||
val bucketLower = if (b == 0) 0.0 else bucketTop(b - 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick - if (zeroBucket) 0.0 else bucketTop(b - 1)
same for prevBucketVal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll fix in my next PR :)
@@ -160,6 +262,9 @@ final case class LongHistogram(buckets: HistogramBuckets, values: Array[Long]) e | |||
s"Expected: ${buckets}, Found: ${other.buckets}" | |||
) | |||
} | |||
// TODO if otel histogram, the need to add values in a different way | |||
// see if we can refactor since MutableHistogram also has this logic | |||
assert(other.buckets == buckets) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: wondering if this check is redundant, since the previous if check does the same thing ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yes - this is from a merge conflict that I needed to resolve. I'll remove in my next PR
Pull Request checklist
Open Telemetry Exponential Histograms Part 1 includes:
rate
,sum
andhistogram_quantile
functions testedhistogram_fraction
Benchmarks show that increasing the number of buckets does not significantly impact performance. Increasing buckets by 700% (8x) reduced throughput by just 11.6% (0.116x).
Coming in later PRs
rate
calculation with counter correction for cumulative exponential histograms