Skip to content
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

Improve StepBucketHistogram #3793

Conversation

lenin-jaganathan
Copy link
Contributor

@lenin-jaganathan lenin-jaganathan commented Apr 29, 2023

This polishes/fixes gh-3749

this(clock, stepMillis, null);
}

protected StepValue(final Clock clock, final long stepMillis, @Nullable final V initValue) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be protected? It looks like it could be package-private instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StepBucketHistogram is part of the distribution package so this needs to be protected to use this constructor.

@shakuzen
Copy link
Member

shakuzen commented May 1, 2023

It looks like OTelCollectorIntegrationTest is failing. Perhaps something has changed in a recently published version of the OTel Collector docker image.

@lenin-jaganathan
Copy link
Contributor Author

lenin-jaganathan commented May 1, 2023

@shakuzen The failures in the OTEL collector test are mostly related to your comment here (at least I think so).

Basically, the test expects the timer to have a name like "test_timer_count", but it seems the name is changed to test_timer__count. The same goes for the counter as well, where test_counter is now test_counter_total. Haven't dug in deep but I don't see any related PR's there.

* eliminate null check on noValue
* to support exporting cumulative buckets
@lenin-jaganathan
Copy link
Contributor Author

@shakuzen / @jonatan-ivanov Does it makes sense for the OtlpStepTimer to be re-named as OtlpDeltaTimer? This is something that I am not able to choose either but I have a slight preference for renaming this as OtlpStepMeters as OtlpDeltaMeter

@jonatan-ivanov
Copy link
Member

@lenin-jaganathan Thank you very much for the PR!
I fixed the build on all of our branches, also rebased this PR to main, see details here: #3796

The summary is: our tests depend on the (wrong) behavior of the OTel collector, some of them were fixed which was a breaking change, so our tests were also broken.

@jonatan-ivanov jonatan-ivanov added type: task A general task registry: otlp OpenTelemetry Protocol (OTLP) registry-related labels May 1, 2023
@jonatan-ivanov jonatan-ivanov added this to the 1.11.0 milestone May 1, 2023
@jonatan-ivanov jonatan-ivanov changed the title Polish StepBucketHistogram Improve StepBucketHistogram May 1, 2023
@jonatan-ivanov jonatan-ivanov merged commit c85a754 into micrometer-metrics:main May 1, 2023
@jonatan-ivanov
Copy link
Member

Does it makes sense for the OtlpStepTimer to be re-named as OtlpDeltaTimer? This is something that I am not able to choose either but I have a slight preference for renaming this as OtlpStepMeters as OtlpDeltaMeter

Sorry, I missed this comment while I was reviewing/played with this.
My two cents:

  • Since it is package-private, it does not have a big significance, we can change anytime.
  • To me the Step* makes a little bit more sense from the perspective of consistency. I'm thinking that instead of renaming, maybe it would make sense calling out the reason why it does not extend StepTimer in the Javadoc .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
registry: otlp OpenTelemetry Protocol (OTLP) registry-related type: task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants