@sentio/runtime 3.0.0-rc.14 → 3.0.0-rc.16
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/{chunk-MV6JXS2P.js → chunk-I45UXGDM.js} +1 -7
- package/lib/{chunk-CPJKSHSV.js → chunk-PCB4OKW7.js} +1 -2
- package/lib/{chunk-33ACY4F2.js → chunk-WBKYSIVF.js} +4 -7
- package/lib/{getMachineId-bsd-ZJR2OQTA.js → getMachineId-bsd-QYFPRONP.js} +2 -2
- package/lib/{getMachineId-darwin-OW6SYINH.js → getMachineId-darwin-XC67FIUW.js} +2 -2
- package/lib/{getMachineId-linux-L5XPRJBN.js → getMachineId-linux-4G7ZY7LQ.js} +2 -2
- package/lib/{getMachineId-unsupported-B3NMIOO3.js → getMachineId-unsupported-5IH5IW7P.js} +2 -2
- package/lib/{getMachineId-win-TT64F63B.js → getMachineId-win-WSA3TUKL.js} +2 -2
- package/lib/index.js +2 -2
- package/lib/processor-runner.js +14442 -27576
- package/lib/processor-runner.js.map +1 -1
- package/lib/service-worker.js +5 -5
- package/package.json +1 -1
- package/src/otlp.ts +20 -12
- package/src/processor-runner.ts +3 -3
- /package/lib/{chunk-MV6JXS2P.js.map → chunk-I45UXGDM.js.map} +0 -0
- /package/lib/{chunk-CPJKSHSV.js.map → chunk-PCB4OKW7.js.map} +0 -0
- /package/lib/{chunk-33ACY4F2.js.map → chunk-WBKYSIVF.js.map} +0 -0
- /package/lib/{getMachineId-bsd-ZJR2OQTA.js.map → getMachineId-bsd-QYFPRONP.js.map} +0 -0
- /package/lib/{getMachineId-darwin-OW6SYINH.js.map → getMachineId-darwin-XC67FIUW.js.map} +0 -0
- /package/lib/{getMachineId-linux-L5XPRJBN.js.map → getMachineId-linux-4G7ZY7LQ.js.map} +0 -0
- /package/lib/{getMachineId-unsupported-B3NMIOO3.js.map → getMachineId-unsupported-5IH5IW7P.js.map} +0 -0
- /package/lib/{getMachineId-win-TT64F63B.js.map → getMachineId-win-WSA3TUKL.js.map} +0 -0
package/lib/service-worker.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
setupLogger
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PCB4OKW7.js";
|
|
5
5
|
import {
|
|
6
6
|
ProcessorServiceImpl,
|
|
7
7
|
configureEndpoints,
|
|
8
8
|
errorString,
|
|
9
9
|
freezeGlobalConfig,
|
|
10
10
|
require_cjs,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} from "./chunk-
|
|
11
|
+
require_lib2 as require_lib,
|
|
12
|
+
require_lib3 as require_lib2
|
|
13
|
+
} from "./chunk-WBKYSIVF.js";
|
|
14
14
|
import "./chunk-ROBPWJIE.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-I45UXGDM.js";
|
|
16
16
|
import {
|
|
17
17
|
__toESM
|
|
18
18
|
} from "./chunk-KVSDPGUI.js";
|
package/package.json
CHANGED
package/src/otlp.ts
CHANGED
|
@@ -1,32 +1,40 @@
|
|
|
1
|
-
import { PeriodicExportingMetricReader } from '@opentelemetry/sdk-metrics'
|
|
1
|
+
import { IMetricReader, MeterProvider, PeriodicExportingMetricReader } from '@opentelemetry/sdk-metrics'
|
|
2
2
|
import { OTLPMetricExporter } from '@opentelemetry/exporter-metrics-otlp-grpc'
|
|
3
3
|
import { PrometheusExporter } from '@opentelemetry/exporter-prometheus'
|
|
4
|
-
import { NodeSDK } from '@opentelemetry/sdk-node'
|
|
5
|
-
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-grpc'
|
|
6
4
|
import { diag, DiagConsoleLogger, DiagLogLevel, metrics } from '@opentelemetry/api'
|
|
7
5
|
|
|
8
6
|
export async function setupOTLP(debug?: boolean) {
|
|
7
|
+
console.log('Setting up OTLP metrics, debug=', !!debug)
|
|
9
8
|
if (debug) {
|
|
10
9
|
diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.DEBUG)
|
|
11
10
|
}
|
|
12
11
|
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
const readers: IMetricReader[] = [
|
|
13
|
+
new PeriodicExportingMetricReader({
|
|
14
|
+
exporter: new OTLPMetricExporter(),
|
|
15
|
+
exportIntervalMillis: 60000
|
|
16
|
+
})
|
|
17
|
+
]
|
|
18
|
+
if (debug) {
|
|
19
|
+
readers.push(
|
|
20
20
|
new PrometheusExporter({
|
|
21
21
|
host: '0.0.0.0',
|
|
22
22
|
port: 4041
|
|
23
23
|
})
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
const meterProvider = new MeterProvider({
|
|
27
|
+
readers: [
|
|
28
|
+
new PeriodicExportingMetricReader({
|
|
29
|
+
exporter: new OTLPMetricExporter(),
|
|
30
|
+
exportIntervalMillis: 60000
|
|
31
|
+
})
|
|
24
32
|
]
|
|
25
33
|
})
|
|
26
34
|
|
|
27
|
-
|
|
35
|
+
metrics.setGlobalMeterProvider(meterProvider)
|
|
28
36
|
;['SIGINT', 'SIGTERM'].forEach((signal) => {
|
|
29
|
-
process.on(signal as any, () =>
|
|
37
|
+
process.on(signal as any, () => meterProvider.forceFlush().catch(console.error))
|
|
30
38
|
})
|
|
31
39
|
|
|
32
40
|
metrics.getMeter('processor').createGauge('up').record(1)
|
package/src/processor-runner.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import fs from 'fs-extra'
|
|
4
|
-
|
|
4
|
+
// import { compressionAlgorithms } from '@grpc/grpc-js'
|
|
5
5
|
import { createServer } from 'nice-grpc'
|
|
6
6
|
import { errorDetailsServerMiddleware } from 'nice-grpc-error-details'
|
|
7
7
|
// import { registry as niceGrpcRegistry } from 'nice-grpc-prometheus'
|
|
8
|
-
import { openTelemetryServerMiddleware } from 'nice-grpc-opentelemetry'
|
|
8
|
+
// import { openTelemetryServerMiddleware } from 'nice-grpc-opentelemetry'
|
|
9
9
|
import http from 'http'
|
|
10
10
|
// @ts-ignore inspector promises is not included in @type/node
|
|
11
11
|
import { Session } from 'node:inspector/promises'
|
|
@@ -61,7 +61,7 @@ if (options.startActionServer) {
|
|
|
61
61
|
// 'grpc.default_compression_algorithm': compressionAlgorithms.gzip
|
|
62
62
|
})
|
|
63
63
|
// .use(prometheusServerMiddleware())
|
|
64
|
-
.use(openTelemetryServerMiddleware())
|
|
64
|
+
// .use(openTelemetryServerMiddleware())
|
|
65
65
|
.use(errorDetailsServerMiddleware)
|
|
66
66
|
|
|
67
67
|
if (options.worker > 1) {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/lib/{getMachineId-unsupported-B3NMIOO3.js.map → getMachineId-unsupported-5IH5IW7P.js.map}
RENAMED
|
File without changes
|
|
File without changes
|