-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Added MarshalerSizer Interface to facilitate creation of Sizer implementations #5929
Added MarshalerSizer Interface to facilitate creation of Sizer implementations #5929
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5929 +/- ##
=======================================
Coverage 91.80% 91.80%
=======================================
Files 198 198
Lines 12377 12377
=======================================
Hits 11363 11363
Misses 800 800
Partials 214 214
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Codecov Report
@@ Coverage Diff @@
## main #5929 +/- ##
=======================================
Coverage 91.93% 91.93%
=======================================
Files 198 198
Lines 12417 12417
=======================================
Hits 11415 11415
Misses 791 791
Partials 211 211
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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 expect to remove some of the conversions to Sizer from batch processor, do I miss something and that is not possible?
Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>
Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>
…ProtoMarshaller Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>
Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>
Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>
42e8441
to
e953488
Compare
@bogdandrutu I wasn't sure if that should be part of this PR or not. This changes makes the current logic still valid. I was going to do a follow up PR with the batch processor changes but I can group them in here if you'd rather just have a single PR. |
@cpheps sounds good, but still a question in the issue if you can respond |
…entations (open-telemetry#5929) * Added NewProtoSizer to instantiate Sizer implementations Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com> * Updated changelog with PR number Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com> * Refactored to create a MarshalSizer interface that is returned by NewProtoMarshaller Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com> * Updated NewProtoMarshaler comments to inidicate return interface Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com> * Corrected interface name Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com> Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>
…entations (#5929) (#5931) * Added NewProtoSizer to instantiate Sizer implementations Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com> * Updated changelog with PR number Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com> * Refactored to create a MarshalSizer interface that is returned by NewProtoMarshaller Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com> * Updated NewProtoMarshaler comments to inidicate return interface Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com> * Corrected interface name Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com> Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com> Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com> Co-authored-by: Corbin Phelps <corbin.phelps@bluemedora.com>
In open-telemetry#5929, the suggestion to have the combined name as "MarshalerSizer" was wrong. Even the comment open-telemetry#5929 (comment) was wrong since the link is `WriteSeeker`. Signed-off-by: Bogdan <bogdandrutu@gmail.com>
In open-telemetry#5929, the suggestion to have the combined name as "MarshalerSizer" was wrong. Even the comment open-telemetry#5929 (comment) was wrong since the link is `WriteSeeker`. Signed-off-by: Bogdan <bogdandrutu@gmail.com>
In #5929, the suggestion to have the combined name as "MarshalerSizer" was wrong. Even the comment #5929 (comment) was wrong since the link is `WriteSeeker`. Signed-off-by: Bogdan <bogdandrutu@gmail.com> Signed-off-by: Bogdan <bogdandrutu@gmail.com>
Description:
Proposing adding a new
MarshalerSizer
interface toptrace
,plog
, andpmetric
packages and alterNewProtoMarshaler
to return this interface. This allows easy creation of aSizer
implementation. Currently the only way to create a sizer for thepdata
packages is to callNewProtoMarshaler
function then cast to aSizer
. This is not intuitive from an API standpoint that it should be safe to cast aMarshaler
as aSizer
.The
MarshalerSizer
interface is a combination of theMarshaler
andSizer
interfaces.If this is merged I will create a follow up PR to update the Batch Processor to use this rather than casting from a
Marshaler
.Link to tracking Issue: #5920
Testing: Updated tests to use the
MarshalSizer
instead of casting.