@orion-js/telemetry 3.11.8 → 3.13.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/lib/index.js +5 -5
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.setupTelemetry = void 0;
|
|
4
4
|
const auto_instrumentations_node_1 = require("@opentelemetry/auto-instrumentations-node");
|
|
5
5
|
const sdk_node_1 = require("@opentelemetry/sdk-node");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
6
|
+
const exporter_prometheus_1 = require("@opentelemetry/exporter-prometheus");
|
|
7
|
+
const host_metrics_1 = require("@opentelemetry/host-metrics");
|
|
8
8
|
function setupTelemetry({ nodeSDKConfig, metrics, }) {
|
|
9
9
|
const metricReader = metrics?.disable
|
|
10
10
|
? undefined
|
|
11
|
-
: new PrometheusExporter({ port: metrics?.port ||
|
|
11
|
+
: new exporter_prometheus_1.PrometheusExporter({ port: metrics?.port || 9464 });
|
|
12
12
|
const sdk = new sdk_node_1.NodeSDK({
|
|
13
13
|
instrumentations: [
|
|
14
14
|
(0, auto_instrumentations_node_1.getNodeAutoInstrumentations)({
|
|
@@ -20,10 +20,10 @@ function setupTelemetry({ nodeSDKConfig, metrics, }) {
|
|
|
20
20
|
metricReader,
|
|
21
21
|
...nodeSDKConfig,
|
|
22
22
|
});
|
|
23
|
+
sdk.start();
|
|
23
24
|
if (metricReader) {
|
|
24
|
-
const hostMetrics = new HostMetrics();
|
|
25
|
+
const hostMetrics = new host_metrics_1.HostMetrics();
|
|
25
26
|
hostMetrics.start();
|
|
26
27
|
}
|
|
27
|
-
sdk.start();
|
|
28
28
|
}
|
|
29
29
|
exports.setupTelemetry = setupTelemetry;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orion-js/telemetry",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.13.1",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"author": "nicolaslopezj",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "18ab5a9711863e6bd3d3c61e7bb8f9067afca82c"
|
|
31
31
|
}
|