-
Notifications
You must be signed in to change notification settings - Fork 598
Global error handler cleanup - exponential histogram #2235
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
Conversation
| record_sum = self.record_sum, | ||
| value = format!("{:?}", v), | ||
| error = "The measurement will be dropped due to scale underflow. Check the histogram configuration" | ||
| ); |
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.
Cijo's comment:
Unless we are 100% sure this cannot cause flooding of logs, lets remove the log from here, and leave a TODO to add logging once we understand more.
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 prefer to log as otel_debug till we are not sure.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2235 +/- ##
=====================================
Coverage 79.5% 79.5%
=====================================
Files 121 121
Lines 21113 21112 -1
=====================================
Hits 16803 16803
+ Misses 4310 4309 -1 ☔ View full report in Codecov by Sentry. |
| scale_delta = scale_delta, | ||
| max_size = self.max_size, | ||
| min_scale = EXPO_MIN_SCALE, | ||
| record_min_max = self.record_min_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.
these configs are too much information, so better skip it.
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 think max_size, min_scale, value and message should be kept, rest can be removed.
opentelemetry-sdk/src/metrics/internal/exponential_histogram.rs
Outdated
Show resolved
Hide resolved
cijothomas
left a comment
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.
Okay to merge as exponential histogram is unlikely to declared stable soon (as it requires views), so we can revisit the comments later.
|
|
||
| // TODO - to check if this should be logged as an error if this is auto-recoverable. | ||
| otel_debug!( | ||
| name: "ExponentialHistogramDataPoint.Scale.Underflow", |
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.
It seems the naming convention is CamelCase. for log names. Is there a reason here?
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.
There are no specific reasons; it simply offers clearer visibility and effectively represents hierarchy when combined with dots. For example, ExponentialHistogramDataPoint.Scale.Underflow seems better to exponentialhistogramdatapoint.scale.underflow or exponential_histogram_datapoint.scale.underflow.
Or better example to represent hierarch would be LoggerProvider.Drop.ShutdownMutexPoisoned as compared to loggerprovider.drop.shutdownmutexpoisoned
But happy to change if there are specific guidelines/preferences.
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.
@TommyCpp - I am merging this to unblock. If there are specific recommendations, we can cover separately as this will affect throughout.
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.
We can get some inputs from OTel Events team recommendations. Our event name is same as what OTel Events are. (There are lot of ongoing discussions in this area, so we need to comeback to this once things are more settled)
Fixes #
Design discussion issue (if applicable) #
Changes
Please provide a brief description of the changes here.
Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial, user-facing changes