-
Notifications
You must be signed in to change notification settings - Fork 1.8k
all: remove OtlpProtoSize in favor of Sizer interface #3818
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
Conversation
|
Does this PR replace this other one? #3692, and if so, can that one be closed? |
kirbyquerby
left a comment
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 taking a look, Bogdan! I've updated based on your comments, please take another look and if it looks good, I can write tests and send this as an actual PR.
bogdandrutu
left a comment
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.
I think this got to a good shape and can be marked as ready for review.
…#3818) * all: remove OtlpProtoSize in favor of Sizer interface * add {Metrics|Traces|Logs}Sizer, fix test commenting * move size tests to pb_test, fix metrics+logs parameter names * uncommented batch_processor tests + adjusted them to use *Sizer * I forgot BenchmarkTraceSizeBytes :( * Add docs for NewProtobof*Sizer + update docs for NewProtobuf*Marshaler * cast *Marshaler to *Sizer for now * add casts to batch_processor_test
Description: remove OtlpProtoSize in favor of Sizer interface.
This change adds a
Sizerinterface + an implementation forpb_marshaleras per the discussion in #3531. This allows us to removeOtlpProtoSize()from traces/metrics/logs and will allow different marshalers to implementSize()themselves.Link to tracking Issue: Fixes #3531
Testing: Moved size tests for traces/metrics/logs to
pb_marshalerand convertedbatch_processor_testto use the *Sizers frompb_marshaler