@agoric/telemetry 0.6.3-upgrade-18a-dev-2899fb9.0 → 0.6.3-upgrade-19-dev-c605745.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 CHANGED
@@ -3,70 +3,6 @@
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-u18.4](https://github.com/Agoric/agoric-sdk/compare/@agoric/telemetry@0.6.3-u18.3...@agoric/telemetry@0.6.3-u18.4) (2024-12-24)
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)
47
-
48
-
49
- ### Features
50
-
51
- * **cosmic-swingset:** add JS upgrade plan handler stub ([655133e](https://github.com/Agoric/agoric-sdk/commit/655133ed909b5d632dc033e992214a7b6a1b5ab1))
52
- * simple CircularBuffer with fs offsets ([8d9cb7a](https://github.com/Agoric/agoric-sdk/commit/8d9cb7abe96e8905f5aaa0927e02914ef09279c4))
53
- * **telemetry:** context aware slog support new triggers ([03965d9](https://github.com/Agoric/agoric-sdk/commit/03965d90b86cf75ce7f6677861e3a0aa8ac70710))
54
- * **telemetry:** ingest-slog explicitly supports `-` for stdin ([63367c4](https://github.com/Agoric/agoric-sdk/commit/63367c4aaf9bafbd6553a1f4cb808c96bc90845a))
55
- * **telemetry:** ingest-slog throttle and flush per block ([2134944](https://github.com/Agoric/agoric-sdk/commit/21349448b3b9379a9da43218a59a7e7eaf4f5a9e))
56
- * use writeSync slogSender ([47a2add](https://github.com/Agoric/agoric-sdk/commit/47a2adda72a5377eda181a425130cdc5a7fd7ff5))
57
-
58
-
59
- ### Bug Fixes
60
-
61
- * ensure script main rejections exit with error ([abdab87](https://github.com/Agoric/agoric-sdk/commit/abdab879014a5c3124ebd0e9246995ac6b1ce6e5))
62
- * **telemetry:** avoid polluting stdout in ingest-slog ([d4b8dfa](https://github.com/Agoric/agoric-sdk/commit/d4b8dfa91155789f7ceda5cc3cef06019b9527e7))
63
- * **telemetry:** handle new trigger slog events ([d32cb7e](https://github.com/Agoric/agoric-sdk/commit/d32cb7e9f406c25399321dc32e827b5018c38b69))
64
- * **telemetry:** ingest-slog avoid writing progress file for stdin ([62589ca](https://github.com/Agoric/agoric-sdk/commit/62589ca7b6d4aaa9eb7042f95ec7aec633db27f9))
65
- * **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
- * **telemetry:** silence slogfile write errors ([91089d7](https://github.com/Agoric/agoric-sdk/commit/91089d7273ef3d41555b34d84471120d45602497))
67
-
68
-
69
-
70
6
  ### [0.6.2](https://github.com/Agoric/agoric-sdk/compare/@agoric/telemetry@0.6.1...@agoric/telemetry@0.6.2) (2023-06-02)
71
7
 
72
8
  **Note:** Version bump only for package @agoric/telemetry
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/telemetry",
3
- "version": "0.6.3-upgrade-18a-dev-2899fb9.0+2899fb9",
3
+ "version": "0.6.3-upgrade-19-dev-c605745.0+c605745",
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-upgrade-18a-dev-2899fb9.0+2899fb9",
26
- "@agoric/store": "0.9.3-upgrade-18a-dev-2899fb9.0+2899fb9",
27
- "@endo/errors": "^1.2.8",
28
- "@endo/init": "^1.1.7",
29
- "@endo/marshal": "^1.6.2",
30
- "@endo/stream": "^1.2.8",
31
- "@opentelemetry/api": "~1.3.0",
32
- "@opentelemetry/api-logs": "0.53.0",
33
- "@opentelemetry/exporter-logs-otlp-http": "0.53.0",
34
- "@opentelemetry/exporter-prometheus": "~0.35.0",
35
- "@opentelemetry/exporter-trace-otlp-http": "~0.35.0",
36
- "@opentelemetry/resources": "~1.9.0",
37
- "@opentelemetry/sdk-logs": "0.53.0",
38
- "@opentelemetry/sdk-metrics": "~1.9.0",
39
- "@opentelemetry/sdk-trace-base": "~1.9.0",
40
- "@opentelemetry/semantic-conventions": "~1.27.0",
25
+ "@agoric/internal": "0.3.3-upgrade-19-dev-c605745.0+c605745",
26
+ "@agoric/store": "0.9.3-upgrade-19-dev-c605745.0+c605745",
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.13",
47
- "@endo/ses-ava": "^1.2.8",
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": "2899fb9f83681eeb3dde7e29bbc9238b20e2f49a"
71
+ "gitHead": "c605745ee6619292b51cec5fc0db0a25ff1b203c"
72
72
  }
@@ -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 {Awaited<ReturnType<typeof makeSimpleCircularBuffer>>} CircularBuffer */
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<Awaited<ReturnType<typeof makeSimpleCircularBuffer>>, 'writeCircBuf'>} circBuf
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
@@ -111,6 +111,7 @@ const getPrometheusMeterProvider = ({
111
111
  const exporter = new PrometheusExporter(
112
112
  {
113
113
  port,
114
+ appendTimestamp: true,
114
115
  },
115
116
  () => {
116
117
  console.warn(
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('Enabling OTLP Traces Exporter to', exporter.getDefaultUrl({}));
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(