-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[exporter/logging] log min and max for histograms #5520
[exporter/logging] log min and max for histograms #5520
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5520 +/- ##
==========================================
+ Coverage 90.87% 90.88% +0.01%
==========================================
Files 191 191
Lines 11362 11378 +16
==========================================
+ Hits 10325 10341 +16
Misses 812 812
Partials 225 225
Continue to review full report at Codecov.
|
internal/otlptext/databuffer.go
Outdated
b.logEntry("Min: %f", p.Min()) | ||
b.logEntry("Max: %f", p.Max()) |
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.
if p.HasMin() {
b.logEntry("Min: %f", p.Min())
}
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.
internal/otlptext/databuffer.go
Outdated
@@ -146,6 +157,14 @@ func (b *dataBuffer) logExponentialHistogramDataPoints(ps pmetric.ExponentialHis | |||
b.logEntry("Count: %d", p.Count()) | |||
b.logEntry("Sum: %f", p.Sum()) |
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.
Sum should be optional for exponential histogram as well. I'll open an issue
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.
Now that #5530 merged, please update the PR to check HasSum
here as well
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.
Done in 2883283. Thanks for updating the proto version! 🙂
go 1.18 unit tests are currently failing. I'm investigating. |
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.
Thanks for fixing this and following up after my change!
Description:
The
logging
exporter did not showmin
andmax
of histograms. This PR adds logging formin
andmax
on both Histograms and Exponential Histograms.Link to tracking Issue: Fixes #5518
Testing:
min
andmax
fields on histograms during implementation of feat(sdk-metrics-base): implement min/max recording for Histograms opentelemetry-js#3032