File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
sdk/monitor/monitor-opentelemetry-exporter/src/export Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -24,19 +24,13 @@ export class AzureMonitorMetricExporter
2424 * Flag to determine if Exporter is shutdown.
2525 */
2626 private _isShutdown = false ;
27- /**
28- * Aggregation temporality.
29- */
30- private _aggregationTemporality : AggregationTemporality ;
31-
3227 /**
3328 * Initializes a new instance of the AzureMonitorMetricExporter class.
3429 * @param AzureExporterConfig - Exporter configuration.
3530 */
3631
3732 constructor ( options : AzureMonitorExporterOptions = { } ) {
3833 super ( options ) ;
39- this . _aggregationTemporality = AggregationTemporality . CUMULATIVE ;
4034 diag . debug ( "AzureMonitorMetricExporter was successfully setup" ) ;
4135 }
4236
@@ -76,7 +70,13 @@ export class AzureMonitorMetricExporter
7670 * Select aggregation temporality
7771 */
7872 public selectAggregationTemporality ( _instrumentType : InstrumentType ) : AggregationTemporality {
79- return this . _aggregationTemporality ;
73+ if (
74+ _instrumentType == InstrumentType . UP_DOWN_COUNTER ||
75+ _instrumentType == InstrumentType . OBSERVABLE_UP_DOWN_COUNTER
76+ ) {
77+ return AggregationTemporality . CUMULATIVE ;
78+ }
79+ return AggregationTemporality . DELTA ;
8080 }
8181
8282 /**
You can’t perform that action at this time.
0 commit comments