File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
experimental/packages/opentelemetry-exporter-metrics-otlp-http/src Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -111,18 +111,14 @@ function chooseTemporalitySelector(
111111 return chooseTemporalitySelectorFromEnvironment ( ) ;
112112}
113113
114+ const DEFAULT_AGGREGATION = Object . freeze ( {
115+ type : AggregationType . DEFAULT ,
116+ } ) ;
117+
114118function chooseAggregationSelector (
115119 config : OTLPMetricExporterOptions | undefined
116- ) {
117- if ( config ?. aggregationPreference ) {
118- return config . aggregationPreference ;
119- } else {
120- return ( _instrumentType : any ) => {
121- return {
122- type : AggregationType . DEFAULT ,
123- } ;
124- } ;
125- }
120+ ) : AggregationSelector {
121+ return config ?. aggregationPreference ?? ( ( ) => DEFAULT_AGGREGATION ) ;
126122}
127123
128124export class OTLPMetricExporterBase
You can’t perform that action at this time.
0 commit comments