File tree 2 files changed +15
-2
lines changed
2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 1
1
import { MetricsInterface } from '.' ;
2
2
import { ConfigServiceInterface , EnvironmentVariablesService } from './config' ;
3
+
3
4
import {
4
5
DecoratorOptions ,
5
6
Dimensions ,
6
7
EmfOutput ,
7
8
HandlerMethodDecorator ,
9
+ StoredMetrics ,
8
10
MetricsOptions ,
9
11
MetricUnit ,
10
12
MetricUnits
@@ -24,7 +26,7 @@ class Metrics implements MetricsInterface {
24
26
private metadata : { [ key : string ] : string } = { } ;
25
27
private namespace ?: string ;
26
28
private raiseOnEmptyMetrics : boolean = false ;
27
- private storedMetrics :{ [ key : string ] : { name : string ; unit : MetricUnit ; value : number } } = { } ;
29
+ private storedMetrics : StoredMetrics = { } ;
28
30
29
31
public constructor ( options : MetricsOptions = { } ) {
30
32
this . dimensions = { } ;
Original file line number Diff line number Diff line change @@ -34,10 +34,21 @@ type DecoratorOptions = {
34
34
captureColdStartMetric ?: boolean
35
35
} ;
36
36
37
+ type StoredMetric = {
38
+ name : string
39
+ unit : MetricUnit
40
+ value : number
41
+ } ;
42
+
43
+ type StoredMetrics = {
44
+ [ key : string ] : StoredMetric
45
+ } ;
46
+
37
47
export {
38
48
DecoratorOptions ,
39
49
Dimensions ,
40
50
EmfOutput ,
51
+ HandlerMethodDecorator ,
41
52
MetricsOptions ,
42
- HandlerMethodDecorator
53
+ StoredMetrics
43
54
} ;
You can’t perform that action at this time.
0 commit comments