@totalsoft/metrics 2.0.0 → 3.0.0
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 +16 -0
- package/dist/src/metrics.js +12 -10
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +19 -14
- package/src/metrics.ts +13 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @totalsoft/metrics
|
|
2
2
|
|
|
3
|
+
## 3.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 7c6fb00: `@opentelemetry/api` is now a peer dependency (`^1.9.0`) instead of a regular dependency.
|
|
8
|
+
|
|
9
|
+
`@opentelemetry/api` keeps its state (tracer provider, meter provider, context) in a single process-wide global, and registration fails when two copies of a different version are installed ("Registration of version vX for trace does not match previously registered API vY"), which silently disables tracing. Declaring it as a dependency let package managers install a private nested copy whenever the application's version was outside the library's range. Applications must now install `@opentelemetry/api` themselves (they already do when they use the OpenTelemetry SDK).
|
|
10
|
+
|
|
11
|
+
`@totalsoft/opentelemetry-instrumentation-ws` also declares `@opentelemetry/instrumentation` (`>=0.200.0 <1`) and `@opentelemetry/core` (`>=2.0.0 <4`) as peer dependencies: both are imported at runtime but were previously only dev dependencies.
|
|
12
|
+
|
|
13
|
+
## 2.0.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- c9bc584: Update dependencies and apply audit fixes.
|
|
18
|
+
|
|
3
19
|
## 2.0.0
|
|
4
20
|
|
|
5
21
|
### Major Changes
|
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);
|