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

OTLP: Convert Exponential histograms start timestamps into zero samples #699

Merged
merged 2 commits into from
Sep 20, 2024

Conversation

jesusvazquez
Copy link
Member

Follow up PR to #684 and #689 where we add the same logic but for exponential histograms.

Unit tests included.

return
}

ts.Histograms = append(ts.Histograms, prompb.Histogram{Timestamp: startTs})
Copy link
Member Author

@jesusvazquez jesusvazquez Sep 20, 2024

Choose a reason for hiding this comment

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

I'd like to know if this is correct to specify the initial 0 for a histogram cc @krajorama

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, empty histogram is valid because schema 0 is defined, and it's ok to have no buckets

@jesusvazquez jesusvazquez marked this pull request as ready for review September 20, 2024 13:07
Copy link
Contributor

@krajorama krajorama left a comment

Choose a reason for hiding this comment

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

LGTM, I was a little unsure about setting the type of the Count field and leaving it nil, but it should work as far as I can tell and we spare an alloc

@jesusvazquez jesusvazquez merged commit 78be23b into main Sep 20, 2024
9 checks passed
@jesusvazquez jesusvazquez deleted the jvp/handle-start-time-for-native-histograms branch September 20, 2024 16:19
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.

2 participants