-
Notifications
You must be signed in to change notification settings - Fork 564
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
otelgrpc: stats handlers record durations in ms instead of ns #4548
Conversation
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #4548 +/- ##
=====================================
Coverage 80.9% 80.9%
=====================================
Files 150 150
Lines 10342 10348 +6
=====================================
+ Hits 8369 8375 +6
Misses 1831 1831
Partials 142 142
|
Is it too much overhead for this to make it into a patch? We had been eagerly waiting the latest release for the stats handler metrics. |
Are you not able to take a dependency on the git hash when this merges? |
Yeah we should! Sorry I'm new to Go |
Co-authored-by: Robert Pająk <pellared@hotmail.com>
…ating elapsed time
Excuse the drive-by comment 👋🏻 Security scanning tools are flagging
The title of this PR and its accompanying bug report seemed scary as it would mean starting to report several orders of magnitude more milliseconds. I wrote a test that compared the previous code and the proposed code, and I couldn't see a difference other than the resolution of the float, but the unit seems correct. Am I missing something? If the goal is to increase the resolution of the float, then the bug and PR description should be updated. Here is a small snippet showing it: https://go.dev/play/p/oF4t3c9wBDZ |
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 do think this justifies a patch release given the recent CVE
If you look at the original commit you'll see a The other changes were just done as follow ups to comments about improving the resolution of the float. |
🤦🏻 I missed that the problem was indeed in the stats handler, and I had only looked into the interceptor. All good! |
I updated the changelog to make it clear. You can se that your feedback was still valuable 👍 |
@Sovietaced Thank you for your contribution 👍 |
This pull request fixes an issue recently introduced in #4356.
I believe it was unintentional that durations would be recorded using nanoseconds when the histogram is a float64. The code is now aligned with how http metric durations are recorded.
Fixes issue: #4547