@@ -25,46 +25,45 @@ import { Histogram } from '../aggregator/types';
25
25
* Basic metric data fields.
26
26
*/
27
27
export interface BaseMetricData {
28
- /**
29
- * Resource associated with metric telemetry.
30
- */
31
- readonly resource : Resource ;
32
- /**
33
- * InstrumentationLibrary which created the metric instrument.
34
- */
35
- readonly instrumentationLibrary : InstrumentationLibrary ;
36
- /**
37
- * InstrumentDescriptor which describes the metric instrument.
38
- */
39
28
readonly instrumentDescriptor : InstrumentDescriptor ;
40
29
/**
41
30
* PointDataType of the metric instrument.
42
31
*/
43
- readonly pointDataType : PointDataType ,
32
+ readonly pointDataType : PointDataType ;
44
33
}
45
34
46
35
/**
47
36
* Represents a metric data aggregated by either a LastValueAggregation or
48
37
* SumAggregation.
49
38
*/
50
39
export interface SingularMetricData extends BaseMetricData {
51
- readonly pointDataType : PointDataType . SINGULAR ,
52
- readonly pointData : PointData < number > [ ] ,
40
+ readonly pointDataType : PointDataType . SINGULAR ;
41
+ readonly pointData : PointData < number > [ ] ;
53
42
}
54
43
55
44
/**
56
45
* Represents a metric data aggregated by a HistogramAggregation.
57
46
*/
58
47
export interface HistogramMetricData extends BaseMetricData {
59
- readonly pointDataType : PointDataType . HISTOGRAM ,
60
- readonly pointData : PointData < Histogram > [ ] ,
48
+ readonly pointDataType : PointDataType . HISTOGRAM ;
49
+ readonly pointData : PointData < Histogram > [ ] ;
61
50
}
62
51
63
52
/**
64
53
* Represents an aggregated metric data.
65
54
*/
66
55
export type MetricData = SingularMetricData | HistogramMetricData ;
67
56
57
+ export interface InstrumentationLibraryMetrics {
58
+ instrumentationLibrary : InstrumentationLibrary ;
59
+ metrics : MetricData [ ] ;
60
+ }
61
+
62
+ export interface ResourceMetrics {
63
+ resource : Resource ;
64
+ instrumentationLibraryMetrics : InstrumentationLibraryMetrics [ ] ;
65
+ }
66
+
68
67
/**
69
68
* The aggregated point data type.
70
69
*/
0 commit comments