@agoric/telemetry 0.6.3-u18.4 → 0.6.3-u19.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 +5 -41
- package/package.json +20 -20
- package/src/flight-recorder.js +6 -2
- package/src/index.js +1 -0
- package/src/otel-trace.js +11 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,47 +3,7 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
### [0.6.3-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Bug Fixes
|
|
10
|
-
|
|
11
|
-
* **telemetry:** add missing slog type ([1aec8d0](https://github.com/Agoric/agoric-sdk/commit/1aec8d05036f6b3c3e3730339d1829da6b4a9051))
|
|
12
|
-
* **telemetry:** Empty context persisted when remaining beans are negative after run finish ([#10635](https://github.com/Agoric/agoric-sdk/issues/10635)) ([ad4e83e](https://github.com/Agoric/agoric-sdk/commit/ad4e83e0b6dff9716da91fd65d367d3acad1772e))
|
|
13
|
-
* **telemetry:** event name typo ([9e19321](https://github.com/Agoric/agoric-sdk/commit/9e19321ea8fed32d445d44169b32f5d94a93d61e))
|
|
14
|
-
* **telemetry:** timer-poll run.id ([#10672](https://github.com/Agoric/agoric-sdk/issues/10672)) ([3b478fb](https://github.com/Agoric/agoric-sdk/commit/3b478fb9e3fe7ded8dec1e83bab68760571f9071)), closes [#10357](https://github.com/Agoric/agoric-sdk/issues/10357) [#10357](https://github.com/Agoric/agoric-sdk/issues/10357)
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
### [0.6.3-u18.3](https://github.com/Agoric/agoric-sdk/compare/@agoric/telemetry@0.6.3-u18.2...@agoric/telemetry@0.6.3-u18.3) (2024-12-13)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
### Bug Fixes
|
|
22
|
-
|
|
23
|
-
* **telemetry:** timer-poll run.id ([#10672](https://github.com/Agoric/agoric-sdk/issues/10672)) ([4185e77](https://github.com/Agoric/agoric-sdk/commit/4185e77aec0babcb00057ff35ea7d8ec3f631976)), closes [#10357](https://github.com/Agoric/agoric-sdk/issues/10357) [#10357](https://github.com/Agoric/agoric-sdk/issues/10357)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
### [0.6.3-u18.2](https://github.com/Agoric/agoric-sdk/compare/@agoric/telemetry@0.6.3-u18.1...@agoric/telemetry@0.6.3-u18.2) (2024-12-09)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
### Bug Fixes
|
|
31
|
-
|
|
32
|
-
* **telemetry:** Empty context persisted when remaining beans are negative after run finish ([#10635](https://github.com/Agoric/agoric-sdk/issues/10635)) ([3988aa0](https://github.com/Agoric/agoric-sdk/commit/3988aa0f0708e367629aca30fe5d09f760ed3ef1))
|
|
33
|
-
* **telemetry:** event name typo ([070b154](https://github.com/Agoric/agoric-sdk/commit/070b154b273748fcc087a012009f70457b4a5d2d))
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
### [0.6.3-u18.1](https://github.com/Agoric/agoric-sdk/compare/@agoric/telemetry@0.6.3-u18.0...@agoric/telemetry@0.6.3-u18.1) (2024-11-19)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
### Bug Fixes
|
|
41
|
-
|
|
42
|
-
* **telemetry:** add missing slog type ([6c500d4](https://github.com/Agoric/agoric-sdk/commit/6c500d4c0c5a329ffbf8a35d6e3754b58578075c))
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
### [0.6.3-u18.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/telemetry@0.6.2...@agoric/telemetry@0.6.3-u18.0) (2024-10-31)
|
|
6
|
+
### [0.6.3-u19.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/telemetry@0.6.2...@agoric/telemetry@0.6.3-u19.0) (2025-02-24)
|
|
47
7
|
|
|
48
8
|
|
|
49
9
|
### Features
|
|
@@ -59,11 +19,15 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
59
19
|
### Bug Fixes
|
|
60
20
|
|
|
61
21
|
* ensure script main rejections exit with error ([abdab87](https://github.com/Agoric/agoric-sdk/commit/abdab879014a5c3124ebd0e9246995ac6b1ce6e5))
|
|
22
|
+
* **telemetry:** add missing slog type ([1aec8d0](https://github.com/Agoric/agoric-sdk/commit/1aec8d05036f6b3c3e3730339d1829da6b4a9051))
|
|
62
23
|
* **telemetry:** avoid polluting stdout in ingest-slog ([d4b8dfa](https://github.com/Agoric/agoric-sdk/commit/d4b8dfa91155789f7ceda5cc3cef06019b9527e7))
|
|
24
|
+
* **telemetry:** Empty context persisted when remaining beans are negative after run finish ([#10635](https://github.com/Agoric/agoric-sdk/issues/10635)) ([ad4e83e](https://github.com/Agoric/agoric-sdk/commit/ad4e83e0b6dff9716da91fd65d367d3acad1772e))
|
|
25
|
+
* **telemetry:** event name typo ([9e19321](https://github.com/Agoric/agoric-sdk/commit/9e19321ea8fed32d445d44169b32f5d94a93d61e))
|
|
63
26
|
* **telemetry:** handle new trigger slog events ([d32cb7e](https://github.com/Agoric/agoric-sdk/commit/d32cb7e9f406c25399321dc32e827b5018c38b69))
|
|
64
27
|
* **telemetry:** ingest-slog avoid writing progress file for stdin ([62589ca](https://github.com/Agoric/agoric-sdk/commit/62589ca7b6d4aaa9eb7042f95ec7aec633db27f9))
|
|
65
28
|
* **telemetry:** otel correctly pop upgrade span ([0ffdf00](https://github.com/Agoric/agoric-sdk/commit/0ffdf001bc8cbdc94081fedfeb4d2376902f4ffc)), closes [#8272](https://github.com/Agoric/agoric-sdk/issues/8272) [#9569](https://github.com/Agoric/agoric-sdk/issues/9569)
|
|
66
29
|
* **telemetry:** silence slogfile write errors ([91089d7](https://github.com/Agoric/agoric-sdk/commit/91089d7273ef3d41555b34d84471120d45602497))
|
|
30
|
+
* **telemetry:** timer-poll run.id ([#10672](https://github.com/Agoric/agoric-sdk/issues/10672)) ([3b478fb](https://github.com/Agoric/agoric-sdk/commit/3b478fb9e3fe7ded8dec1e83bab68760571f9071)), closes [#10357](https://github.com/Agoric/agoric-sdk/issues/10357) [#10357](https://github.com/Agoric/agoric-sdk/issues/10357)
|
|
67
31
|
|
|
68
32
|
|
|
69
33
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/telemetry",
|
|
3
|
-
"version": "0.6.3-
|
|
3
|
+
"version": "0.6.3-u19.0",
|
|
4
4
|
"description": "Agoric's telemetry implementation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": "https://github.com/Agoric/agoric-sdk",
|
|
@@ -22,29 +22,29 @@
|
|
|
22
22
|
"author": "Agoric",
|
|
23
23
|
"license": "Apache-2.0",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@agoric/internal": "^0.4.0-
|
|
26
|
-
"@agoric/store": "^0.9.3-
|
|
27
|
-
"@endo/errors": "^1.2.
|
|
28
|
-
"@endo/init": "^1.1.
|
|
29
|
-
"@endo/marshal": "^1.6.
|
|
30
|
-
"@endo/stream": "^1.2.
|
|
31
|
-
"@opentelemetry/api": "~1.
|
|
32
|
-
"@opentelemetry/api-logs": "0.
|
|
33
|
-
"@opentelemetry/exporter-logs-otlp-http": "0.
|
|
34
|
-
"@opentelemetry/exporter-prometheus": "~0.
|
|
35
|
-
"@opentelemetry/exporter-trace-otlp-http": "
|
|
36
|
-
"@opentelemetry/resources": "~1.
|
|
37
|
-
"@opentelemetry/sdk-logs": "0.
|
|
38
|
-
"@opentelemetry/sdk-metrics": "~1.
|
|
39
|
-
"@opentelemetry/sdk-trace-base": "~1.
|
|
40
|
-
"@opentelemetry/semantic-conventions": "~1.
|
|
25
|
+
"@agoric/internal": "^0.4.0-u19.0",
|
|
26
|
+
"@agoric/store": "^0.9.3-u19.0",
|
|
27
|
+
"@endo/errors": "^1.2.9",
|
|
28
|
+
"@endo/init": "^1.1.8",
|
|
29
|
+
"@endo/marshal": "^1.6.3",
|
|
30
|
+
"@endo/stream": "^1.2.9",
|
|
31
|
+
"@opentelemetry/api": "~1.9.0",
|
|
32
|
+
"@opentelemetry/api-logs": "0.57.1",
|
|
33
|
+
"@opentelemetry/exporter-logs-otlp-http": "0.57.1",
|
|
34
|
+
"@opentelemetry/exporter-prometheus": "~0.57.1",
|
|
35
|
+
"@opentelemetry/exporter-trace-otlp-http": "0.57.1",
|
|
36
|
+
"@opentelemetry/resources": "~1.30.1",
|
|
37
|
+
"@opentelemetry/sdk-logs": "0.57.1",
|
|
38
|
+
"@opentelemetry/sdk-metrics": "~1.30.1",
|
|
39
|
+
"@opentelemetry/sdk-trace-base": "~1.30.1",
|
|
40
|
+
"@opentelemetry/semantic-conventions": "~1.28.0",
|
|
41
41
|
"anylogger": "^0.21.0",
|
|
42
42
|
"better-sqlite3": "^9.1.1",
|
|
43
43
|
"tmp": "^0.2.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@endo/lockdown": "^1.0.
|
|
47
|
-
"@endo/ses-ava": "^1.2.
|
|
46
|
+
"@endo/lockdown": "^1.0.14",
|
|
47
|
+
"@endo/ses-ava": "^1.2.9",
|
|
48
48
|
"ava": "^5.3.0",
|
|
49
49
|
"c8": "^10.1.2",
|
|
50
50
|
"tmp": "^0.2.1"
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"typeCoverage": {
|
|
69
69
|
"atLeast": 88.88
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "29e9704c375a06bb617027093b30d2d25faa6471"
|
|
72
72
|
}
|
package/src/flight-recorder.js
CHANGED
|
@@ -8,6 +8,10 @@ import path from 'node:path';
|
|
|
8
8
|
import { Fail } from '@endo/errors';
|
|
9
9
|
import { serializeSlogObj } from './serialize-slog-obj.js';
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* @import {EReturn} from '@endo/far';
|
|
13
|
+
*/
|
|
14
|
+
|
|
11
15
|
export const DEFAULT_CBUF_SIZE = 100 * 1024 * 1024;
|
|
12
16
|
export const DEFAULT_CBUF_FILE = 'flight-recorder.bin';
|
|
13
17
|
export const SLOG_MAGIC = 0x41472d534c4f4721n; // 'AG-SLOG!'
|
|
@@ -63,7 +67,7 @@ const initializeCircularBuffer = async (bufferFile, circularBufferSize) => {
|
|
|
63
67
|
return arenaSize;
|
|
64
68
|
};
|
|
65
69
|
|
|
66
|
-
/** @typedef {
|
|
70
|
+
/** @typedef {EReturn<typeof makeSimpleCircularBuffer>} CircularBuffer */
|
|
67
71
|
|
|
68
72
|
/**
|
|
69
73
|
*
|
|
@@ -270,7 +274,7 @@ export const makeSimpleCircularBuffer = async ({
|
|
|
270
274
|
|
|
271
275
|
/**
|
|
272
276
|
*
|
|
273
|
-
* @param {Pick<
|
|
277
|
+
* @param {Pick<EReturn<typeof makeSimpleCircularBuffer>, 'writeCircBuf'>} circBuf
|
|
274
278
|
*/
|
|
275
279
|
export const makeSlogSenderFromBuffer = ({ writeCircBuf }) => {
|
|
276
280
|
/** @type {Promise<void>} */
|
package/src/index.js
CHANGED
package/src/otel-trace.js
CHANGED
|
@@ -22,16 +22,26 @@ export const SPAN_EXPORT_DELAY_MS = 1_000;
|
|
|
22
22
|
export const makeOtelTracingProvider = opts => {
|
|
23
23
|
const { env = process.env } = opts || {};
|
|
24
24
|
|
|
25
|
+
// https://opentelemetry.io/docs/concepts/signals/
|
|
26
|
+
// https://opentelemetry.io/docs/specs/otel/protocol/exporter/#endpoint-urls-for-otlphttp
|
|
27
|
+
// https://github.com/open-telemetry/opentelemetry-js/blob/experimental/v0.57.1/experimental/packages/exporter-trace-otlp-http/README.md#configuration-options-as-environment-variables
|
|
25
28
|
const { OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT } =
|
|
26
29
|
env;
|
|
27
30
|
if (!OTEL_EXPORTER_OTLP_ENDPOINT && !OTEL_EXPORTER_OTLP_TRACES_ENDPOINT) {
|
|
31
|
+
console.debug(
|
|
32
|
+
'Not enabling OTLP Traces Exporter; enable with OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=<target URL> or OTEL_EXPORTER_OTLP_ENDPOINT=<target URL prefix>',
|
|
33
|
+
);
|
|
28
34
|
return undefined;
|
|
29
35
|
}
|
|
30
36
|
|
|
31
37
|
const resource = new Resource(getResourceAttributes(opts));
|
|
32
38
|
|
|
33
39
|
const exporter = new OTLPTraceExporter();
|
|
34
|
-
console.info(
|
|
40
|
+
console.info(
|
|
41
|
+
'Enabling OTLP Traces Exporter to',
|
|
42
|
+
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT ||
|
|
43
|
+
`${OTEL_EXPORTER_OTLP_ENDPOINT}/v1/traces`,
|
|
44
|
+
);
|
|
35
45
|
|
|
36
46
|
const provider = new BasicTracerProvider({ resource });
|
|
37
47
|
provider.addSpanProcessor(
|