feat(sdk-metrics)!: drop View and Aggregation for options #4931
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which problem is this PR solving?
Drops
Aggregation
andView
for options (AggregationOption
andViewOptions
, respectively). This means we will have two less classes exported from the@opentelemetry/sdk-metrics
package. This has a few benefits:Aggregation
is not user-implementable, so having only options makes this clearer.Aggregation
was supposed to be used in exporters, however its type does reference SDK internal types as well. This means that if these supposedly internal types change, the exporter may break too if it pins an older version of@opentelemetry/sdk-metrics
(which is a valid approach for writing an exporter).View
is really only used internally and not directly by the user, so writingnew View({...})
for each view is just additional work vs{...}
.Fixes #4654
Type of change
How Has This Been Tested?