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

prw2.0: Added support for "custom" layouts for native histogram proto #13558

Merged
merged 4 commits into from
Mar 14, 2024

Conversation

@bwplotka bwplotka changed the title prw2.0: Added support for "custom" layouts for native histogram. prw2.0: Added support for "custom" layouts for native histogram proto Feb 7, 2024
prompb/write/v2/types.proto Outdated Show resolved Hide resolved
prompb/write/v2/types.proto Outdated Show resolved Hide resolved
prompb/write/v2/types.proto Outdated Show resolved Hide resolved
prompb/write/v2/types.proto Outdated Show resolved Hide resolved
prompb/write/v2/types.proto Outdated Show resolved Hide resolved
prompb/write/v2/types.proto Show resolved Hide resolved
prompb/write/v2/types.proto Outdated Show resolved Hide resolved
prompb/write/v2/types.proto Outdated Show resolved Hide resolved
Copy link

@npazosmendez npazosmendez left a comment

Choose a reason for hiding this comment

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

LGTM

Krajo's nits probably make sense but I don't have enough context

@npazosmendez npazosmendez mentioned this pull request Feb 22, 2024
16 tasks
Result of the discussions:
* #13475 (comment)
* https://cloud-native.slack.com/archives/C02KR205UMU/p1707301006347199

Signed-off-by: bwplotka <bwplotka@gmail.com>

# Conflicts:
#	prompb/write/v2/types.pb.go
Copy link
Member

@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.

Approved with nit on a typo

prompb/write/v2/types.proto Outdated Show resolved Hide resolved
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
Comment on lines 229 to 230
// The last element is a lower bound for the implicit +Inf bucket (the overflow
// bucket).
Copy link
Member

Choose a reason for hiding this comment

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

That's not consistent with the above (which says that the +Inf bucket is marked by pointing to len(custom_values)).

Copy link
Member

Choose a reason for hiding this comment

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

OK, I take that back. It is consistent, but it is confusing because that element is also the upper bound of the last non-Inf bucket.

Maybe word that better. Suggestion: "The last element is not only the upper inclusive bound of the last regular bucket, but implicitly the lower exclusive bound of the +Inf bucket."

Copy link
Member

Choose a reason for hiding this comment

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

Or remove this sentence entirely, as things are explained above for the +Inf bucket.

Copy link
Member Author

Choose a reason for hiding this comment

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

I would mention this, will use your suggestion.

// custom_values is an additional field used by non-exponential bucketing layouts.
//
// For custom buckets (-53 schema value) custom_values specify monotonically
// increasing upper inclusive boundary for the bucket counts with arbitrary
Copy link
Member

Choose a reason for hiding this comment

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

boundary → boundaries

Signed-off-by: bwplotka <bwplotka@gmail.com>
@bwplotka
Copy link
Member Author

bwplotka commented Mar 14, 2024

Addressed all and fixed tests. Thanks everyone for patience!

Copy link
Member

@beorn7 beorn7 left a comment

Choose a reason for hiding this comment

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

Woah, the OptimizedMarshalToSizedBuffer scares me. But approving anyway, provided that tests have passed.

@bwplotka
Copy link
Member Author

Yea, this might get replaced with new protobuf (+gogo removal)

@bwplotka bwplotka merged commit 0eae349 into remote-write-2.0 Mar 14, 2024
37 checks passed
@bwplotka bwplotka deleted the bwplotka/prw-custom1 branch March 14, 2024 13:47
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.

None yet

5 participants