-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Align DeltaHistogram in SignalFx registry with count and total #3799
Align DeltaHistogram in SignalFx registry with count and total #3799
Conversation
@atoulme / @bogdandrutu Need your input on the first item in the description. I believe this is critical to be part of 1.11.0 to align with the latest changes made to the micrometer-core. |
Hey @lenin-jaganathan. We set up a test to examine the current behavior of the Timer with both percentiles and slo enabled. You can see the code and the results here: https://github.com/breedx-splk/micrometer_perc_sla_timer The current behavior results in 4 gauges and 2 sums. Most interestingly are the Given that some users might rely on this existing behavior, it would be ideal to maintain the shape of those metrics. 👍🏻 |
@breedx-splk Thanks for confirming this. Since the feature is completely broken in micrometer 1.11.0, I have targeted this PR for 1.11.x and it makes sense to only fix the broken behavior in the patch release. @jonatan-ivanov Does it makes sense for this to be targeted for 1.11.x? #3774 completely blocks us from using the 1.11.x micrometer. |
ad5b63c
to
b011789
Compare
@breedx-splk Can you have a look at this PR? Kept the existing behavior in SignalFxMeterRegistry for histograms and only the DeltaHistogram is altered so that it address the issue (i,e align with Sum and Count). |
I need to take a deeper look but since it seems a bug it makes sense to fix it in a patch release. Also, if we decide to back-port it to earlier releases (1.9.x), maybe this can be fixed earlier. |
Hey @lenin-jaganathan . Respectfully, without knowing much about micrometer implementation internals and not knowing much about the
I don't think I follow this. With delta histograms turned on in the registry, I see a
I take this to mean that the "histogram" for the slo has 3 buckets -- one for each value and one for +inf. Am I understanding that incorrectly? Is the problem then that the 51 and the 82 don't match? Regardless, the count does seem to be notably lower than the actual number of ticks issued by the app. |
@jonatan-ivanov That would be good. Just a note,
So, the only major version where this is broken is 1.11.0, which is why I based this on 1.11.x. It would be nice to have some feedback on this from you guys and get this in time for the next patch.
@breedx-splk I get you and I don't want to be hard on you here. But yeah, the exact thing you mentioned in your comment where the histogram reports 82 values and the count reports 51 is the issue this PR is trying to fix. (Do note that this is the behavior when @jonatan-ivanov / @shakuzen Need your help in getting this merged. |
6213de6
to
0d3a461
Compare
...tations/micrometer-registry-signalfx/src/main/java/io/micrometer/signalfx/SignalfxTimer.java
Outdated
Show resolved
Hide resolved
🛠 Lift Auto-fixSome of the Lift findings in this PR can be automatically fixed. You can download and apply these changes in your local project directory of your branch to review the suggestions before committing.1 # Download the patch
curl https://lift.sonatype.com/api/patch/github.com/micrometer-metrics/micrometer/3799.diff -o lift-autofixes.diff
# Apply the patch with git
git apply lift-autofixes.diff
# Review the changes
git diff Want it all in a single command? Open a terminal in your project's directory and copy and paste the following command: curl https://lift.sonatype.com/api/patch/github.com/micrometer-metrics/micrometer/3799.diff | git apply Once you're satisfied, commit and push your changes in your project. Footnotes |
23871ba
to
d02789c
Compare
...eter-registry-signalfx/src/main/java/io/micrometer/signalfx/SignalfxDistributionSummary.java
Show resolved
Hide resolved
I think it is totally fine that this is based on
|
Got it. Thanks @jonatan-ivanov for the explanation 👍🏽. I guess 1.11.1 is scheduled for first week June right? So ajy help with the review will be appreciated. Thanks a lot. |
@jonatan-ivanov/ @shakuzen Any help with the review is appreciated. This is kind of a blocker for us to move to 1.11.x which has some fixes and improvements. Basically, if this makes it in time for 1.11.1, it would be really helpful. Thank you!! |
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 the pull request, and for updating it with a separate test. I think overall it's good. My biggest concern is opening up API we'll need to maintain in a patch release. I'd like to explore more if we can reasonably avoid that.
...eter-registry-signalfx/src/main/java/io/micrometer/signalfx/SignalfxDistributionSummary.java
Outdated
Show resolved
Hide resolved
...micrometer-registry-signalfx/src/main/java/io/micrometer/signalfx/SignalFxMeterRegistry.java
Outdated
Show resolved
Hide resolved
...ometer-registry-signalfx/src/test/java/io/micrometer/signalfx/SignalFxMeterRegistryTest.java
Outdated
Show resolved
Hide resolved
7bf45e9
to
1793b11
Compare
- rollOver StepBucketHistogram on calls to count() - PollingAwareMockStepClock was introduced to ensure pollMetersToRollover as soon as step crosses - Restrict the visibility of pollMetersToRollover to package-private
07597a2
to
5eb7eeb
Compare
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.
Looks good to me. I left a couple comments on small things to fix. Thanks for the work on this.
...eter-registry-signalfx/src/main/java/io/micrometer/signalfx/SignalfxDistributionSummary.java
Show resolved
Hide resolved
micrometer-test/src/main/java/io/micrometer/core/instrument/step/PollingAwareMockStepClock.java
Show resolved
Hide resolved
- additional comments on SignalfxDistributionSummary and SignalfxTimer
Addressed the open queries and comments. |
fixes #3774, and partially this one too
Known Issues,
Need help from someone from SignalFx to confirm the expected behaviors when both percentiles and sla are enabled on a Timer. This will help in writing failing tests based on the expected behavior and then fixing the.- Kept the old behavior as is and fixed the issue by using StepBucketHistogram for Delta Usecases.