Skip to content

Move receiver builder into internal service #10781

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

Merged
merged 8 commits into from
Aug 21, 2024

Conversation

dmathieu
Copy link
Member

@dmathieu dmathieu commented Aug 1, 2024

Description

This moves the receiver builder out of the receiver package, and into service/internal/builders.
There's no real reason for this struct to be public (folks shouldn't call it), and making it private will allow us to add profiling support to it.

Link to tracking issue

#10375 (review)

@dmathieu dmathieu marked this pull request as ready for review August 1, 2024 09:44
@dmathieu dmathieu requested review from a team and codeboten August 1, 2024 09:44
Copy link

codecov bot commented Aug 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.68%. Comparing base (6764622) to head (b05f08a).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10781      +/-   ##
==========================================
+ Coverage   91.66%   91.68%   +0.02%     
==========================================
  Files         405      406       +1     
  Lines       18979    19032      +53     
==========================================
+ Hits        17397    17450      +53     
  Misses       1223     1223              
  Partials      359      359              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mx-psi mx-psi added this to the Profiling support milestone Aug 1, 2024
@dmathieu dmathieu force-pushed the move-receiver-builder branch 2 times, most recently from 2c8a143 to 0cc2628 Compare August 1, 2024 13:58
@dmathieu dmathieu force-pushed the move-receiver-builder branch from 0cc2628 to f598cd0 Compare August 1, 2024 14:08
@dmathieu dmathieu force-pushed the move-receiver-builder branch from 96906e5 to c610f18 Compare August 2, 2024 08:28
Comment on lines 48 to 51
//
// Deprecated: use the [ReceiversConfigs] and [ReceiversFactories] options
// instead.
Receivers builders.Receiver
Copy link
Member

Choose a reason for hiding this comment

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

This is a breaking change since it's a different type now

Copy link
Member

Choose a reason for hiding this comment

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

I believe we could make it not a breaking change if we make builders.Receiver an alias to receiver.Builder

Copy link
Member Author

Choose a reason for hiding this comment

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

How is that a breaking change?
We're indeed changing it from a struct to an interface, but they match each other, so passing the struct will still work properly.

Copy link
Member

Choose a reason for hiding this comment

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

I believe this is not a breaking change, @dmitryax could you show an example where this would break?

Copy link
Member

@dmitryax dmitryax Aug 21, 2024

Choose a reason for hiding this comment

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

Imagine if someone extracts the field value and expects a specific type there. That code will break. But that's fine I think. I missed that it's an interface matching the old struct.

@dmathieu dmathieu force-pushed the move-receiver-builder branch from 7a903af to 5892a98 Compare August 19, 2024 08:12
Comment on lines 48 to 51
//
// Deprecated: use the [ReceiversConfigs] and [ReceiversFactories] options
// instead.
Receivers builders.Receiver
Copy link
Member

Choose a reason for hiding this comment

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

I believe this is not a breaking change, @dmitryax could you show an example where this would break?

@mx-psi mx-psi requested a review from dmitryax August 20, 2024 13:34
@dmitryax dmitryax merged commit 454432e into open-telemetry:main Aug 21, 2024
48 of 49 checks passed
@dmathieu dmathieu deleted the move-receiver-builder branch August 21, 2024 15:04
mx-psi pushed a commit that referenced this pull request Aug 30, 2024
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

There builders were deprecated in 0.108.0, so they can be removed now.

PRs that deprecated the builders:
* #10781
* #10782
* #10783
* #10784
* #10785

cc @mx-psi
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.

3 participants