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

Support for ExponentialHistogram in OTLP Registry #3959

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lenin-jaganathan
Copy link
Contributor

@lenin-jaganathan lenin-jaganathan commented Jul 6, 2023

Resolves #3861.

Adds support for https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md#exponentialhistogram. Math used for index calculation is re-used from the OTEL specification which lays down the formula/techniques to be considered for index calculation also keeping performance in mind.

Did some benchmarking between the explicit bucket histograms used earlier and the exponential histogram and below are the results,

GC allocation,
Screenshot 2023-07-06 at 2 26 33 PM
Throughput in ns,
Screenshot 2023-07-06 at 2 26 52 PM

Known Issues,

  • For delta flavor, the support for last-minute data is not yet added.
  • While recording the exact powers of 2 on a positive scale, the exact computation is not used. It seems it will cause performance concerns with extra computation for every recording cycle.

@sonatype-lift
Copy link
Contributor

sonatype-lift bot commented Jul 6, 2023

🛠 Lift Auto-fix

Some 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/3959.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/3959.diff | git apply

Once you're satisfied, commit and push your changes in your project.

Footnotes

  1. You can preview the patch by opening the patch URL in the browser.

@lenin-jaganathan lenin-jaganathan force-pushed the exponential_histogram branch 3 times, most recently from a79e04d to aa58dde Compare July 10, 2023 13:34
@lenin-jaganathan
Copy link
Contributor Author

@jonatan-ivanov / @shakuzen Is this something that can be looked for next milestone release?

@lenin-jaganathan
Copy link
Contributor Author

@shakuzen / @jonatan-ivanov Circling back to see if this can be looked upon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support to export ExponentialHistogram in OTLP
1 participant