Skip to content

Conversation

@kirbyquerby
Copy link
Member

@kirbyquerby kirbyquerby commented Aug 11, 2021

Description: remove OtlpProtoSize in favor of Sizer interface.

This change adds a Sizer interface + an implementation for pb_marshaler as per the discussion in #3531. This allows us to remove OtlpProtoSize() from traces/metrics/logs and will allow different marshalers to implement Size() themselves.

Link to tracking Issue: Fixes #3531

Testing: Moved size tests for traces/metrics/logs to pb_marshaler and converted batch_processor_test to use the *Sizers from pb_marshaler

@codeboten
Copy link
Contributor

codeboten commented Aug 11, 2021

Does this PR replace this other one? #3692, and if so, can that one be closed?

Copy link
Member Author

@kirbyquerby kirbyquerby left a 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.

Copy link
Member

@bogdandrutu bogdandrutu left a 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.

@kirbyquerby kirbyquerby marked this pull request as ready for review August 11, 2021 23:14
@kirbyquerby kirbyquerby requested review from a team and owais August 11, 2021 23:14
@alolita alolita requested review from Aneurysm9 and anuraaga August 12, 2021 16:36
@bogdandrutu bogdandrutu merged commit aa450a0 into open-telemetry:main Aug 17, 2021
tbarker25 pushed a commit to tbarker25/opentelemetry-collector that referenced this pull request Aug 20, 2021
…#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
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.

Investigate how, and remove pdata OtlpProtoSize

4 participants