-
Notifications
You must be signed in to change notification settings - Fork 837
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
feat(sdk-metrics)!: extract IMetricReader interface and use it over abstract class #5311
feat(sdk-metrics)!: extract IMetricReader interface and use it over abstract class #5311
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5311 +/- ##
=======================================
Coverage 94.54% 94.54%
=======================================
Files 318 318
Lines 8051 8051
Branches 1694 1694
=======================================
Hits 7612 7612
Misses 439 439
|
Isn't this change make the option bag more general to accept any object that conforms to the new interface, instead of a subclass? In this sense, it reads to me that this is not breaking. |
I'm not sure what the stability guarantees are for options bags like this. Practically this is non-breaking - and as a developer I would always expect this to become more general due to the context in which it should be used. Technically however, the only way this can be breaking is that if someone else consumes a |
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 the explanation!
This has a conflict. |
Which problem is this PR solving?
We periodically run into problems since private properties in classes cause the type to be incompatible between versions. This PR fixes that for
MetricReader
by extracting an interface which we then use instead of the abstract class type in our public interface.In this PR
MetricReader
type stays as-is, but this is marked as a breaking change since we technically narrow down what's being provided byMeterProviderOptions
.Part of #5283
Type of change