@totalsoft/metrics 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/src/metrics.js +12 -10
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +16 -14
- package/src/metrics.ts +13 -11
package/CHANGELOG.md
CHANGED
package/dist/src/metrics.js
CHANGED
|
@@ -13,20 +13,22 @@ const exporter = new exporter_prometheus_1.PrometheusExporter({ preventServerSta
|
|
|
13
13
|
const meterProvider = new sdk_metrics_1.MeterProvider({
|
|
14
14
|
readers: [exporter],
|
|
15
15
|
views: [
|
|
16
|
-
|
|
16
|
+
{
|
|
17
17
|
instrumentType: sdk_metrics_1.InstrumentType.HISTOGRAM,
|
|
18
18
|
instrumentUnit: 'seconds',
|
|
19
|
-
aggregation:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
aggregation: {
|
|
20
|
+
type: sdk_metrics_1.AggregationType.EXPLICIT_BUCKET_HISTOGRAM,
|
|
21
|
+
options: { boundaries: [0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10] }
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
24
25
|
instrumentType: sdk_metrics_1.InstrumentType.HISTOGRAM,
|
|
25
26
|
instrumentUnit: 'milliseconds',
|
|
26
|
-
aggregation:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
aggregation: {
|
|
28
|
+
type: sdk_metrics_1.AggregationType.EXPLICIT_BUCKET_HISTOGRAM,
|
|
29
|
+
options: { boundaries: [5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000] }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
30
32
|
]
|
|
31
33
|
});
|
|
32
34
|
api_1.metrics.setGlobalMeterProvider(meterProvider);
|