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
24
24
* Flag to determine if Exporter is shutdown.
25
25
*/
26
26
private _isShutdown = false ;
27
- /**
28
- * Aggregation temporality.
29
- */
30
- private _aggregationTemporality : AggregationTemporality ;
31
-
32
27
/**
33
28
* Initializes a new instance of the AzureMonitorMetricExporter class.
34
29
* @param AzureExporterConfig - Exporter configuration.
35
30
*/
36
31
37
32
constructor ( options : AzureMonitorExporterOptions = { } ) {
38
33
super ( options ) ;
39
- this . _aggregationTemporality = AggregationTemporality . CUMULATIVE ;
40
34
diag . debug ( "AzureMonitorMetricExporter was successfully setup" ) ;
41
35
}
42
36
@@ -76,7 +70,13 @@ export class AzureMonitorMetricExporter
76
70
* Select aggregation temporality
77
71
*/
78
72
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 ;
80
80
}
81
81
82
82
/**
You can’t perform that action at this time.
0 commit comments