-
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
BreakingChange: Change to use interface instead of func for MapConverter #5382
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5382 +/- ##
==========================================
- Coverage 90.75% 90.70% -0.06%
==========================================
Files 190 191 +1
Lines 11422 11423 +1
==========================================
- Hits 10366 10361 -5
- Misses 837 842 +5
- Partials 219 220 +1
Continue to review full report at Codecov.
|
76aa6d1
to
e75acd6
Compare
The main reason to do this, is because if in the future we want to extend the capabilities of the "MapConverter" we don't have any way to do that. By using an interface we can define "optional" interfaces that some converters may implement to enable future improvements. Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
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 prefer the use of an interface as per the change. Is there a way to deprecate the existing converter's New
functions before changing them? Otherwise this breaks the "breaking change" policy
Convert(ctx context.Context, cfgMap *Map) error | ||
} | ||
|
||
// Deprecated: Implement MapConverter interface. |
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.
Missing version
Indeed that's why it is called "braking change" and not deprecation, we need @open-telemetry/collector-approvers to say they are ok with this. |
The result of the |
I'm Ok with accepting this exception. This API doesn't seem to be widely adopted at this point |
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 am OK with the change.
@codeboten ptal |
The main reason to do this, is because if in the future we want to extend the capabilities of the "MapConverter" we don't have any way to do that. By using an interface we can define "optional" interfaces that some converters may implement to enable future improvements.
Signed-off-by: Bogdan Drutu bogdandrutu@gmail.com