@agoric/telemetry 0.6.3-upgrade-18-dev-bdbf7c9.0 → 0.6.3-upgrade-18-dev-6a4fdea.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 +10 -0
- package/package.json +4 -4
- package/src/context-aware-slog.js +10 -6
- package/src/otel-context-aware-slog.js +2 -2
- package/src/slog-to-otel.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
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.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)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **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))
|
|
12
|
+
* **telemetry:** event name typo ([070b154](https://github.com/Agoric/agoric-sdk/commit/070b154b273748fcc087a012009f70457b4a5d2d))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
6
16
|
### [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)
|
|
7
17
|
|
|
8
18
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/telemetry",
|
|
3
|
-
"version": "0.6.3-upgrade-18-dev-
|
|
3
|
+
"version": "0.6.3-upgrade-18-dev-6a4fdea.0+6a4fdea",
|
|
4
4
|
"description": "Agoric's telemetry implementation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": "https://github.com/Agoric/agoric-sdk",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"author": "Agoric",
|
|
23
23
|
"license": "Apache-2.0",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@agoric/internal": "0.4.0-upgrade-18-dev-
|
|
26
|
-
"@agoric/store": "0.9.3-upgrade-18-dev-
|
|
25
|
+
"@agoric/internal": "0.4.0-upgrade-18-dev-6a4fdea.0+6a4fdea",
|
|
26
|
+
"@agoric/store": "0.9.3-upgrade-18-dev-6a4fdea.0+6a4fdea",
|
|
27
27
|
"@endo/errors": "^1.2.7",
|
|
28
28
|
"@endo/init": "^1.1.6",
|
|
29
29
|
"@endo/marshal": "^1.6.1",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"typeCoverage": {
|
|
69
69
|
"atLeast": 87.03
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "6a4fdea235f66ee20d89801aafa3b5d272059b42"
|
|
72
72
|
}
|
|
@@ -135,9 +135,9 @@ export const makeContextualSlogProcessor = (
|
|
|
135
135
|
|
|
136
136
|
/**
|
|
137
137
|
* @param {Slog} slog
|
|
138
|
-
* @returns {{ attributes: T & LogAttributes, body: Partial<Slog>;
|
|
138
|
+
* @returns {{ attributes: T & LogAttributes, body: Partial<Slog>; time: Slog['time'] }}
|
|
139
139
|
*/
|
|
140
|
-
const slogProcessor = ({ monotime, time
|
|
140
|
+
const slogProcessor = ({ monotime, time, ...body }) => {
|
|
141
141
|
const finalBody = { ...body };
|
|
142
142
|
|
|
143
143
|
/** @type {{'crank.syscallNum'?: Slog['syscallNum']}} */
|
|
@@ -321,13 +321,13 @@ export const makeContextualSlogProcessor = (
|
|
|
321
321
|
|
|
322
322
|
const logAttributes = {
|
|
323
323
|
...staticContext,
|
|
324
|
-
'process.uptime': monotime,
|
|
325
324
|
...initContext, // Optional prelude
|
|
326
325
|
...blockContext, // Block is the first level of execution nesting
|
|
327
326
|
...triggerContext, // run and trigger info is nested next
|
|
328
327
|
...crankContext, // Finally cranks are the last level of nesting
|
|
329
328
|
...replayContext, // Replay is a substitute for crank context during vat page in
|
|
330
329
|
...eventLogAttributes,
|
|
330
|
+
'process.uptime': monotime,
|
|
331
331
|
};
|
|
332
332
|
|
|
333
333
|
/**
|
|
@@ -356,7 +356,11 @@ export const makeContextualSlogProcessor = (
|
|
|
356
356
|
// eslint-disable-next-line no-restricted-syntax
|
|
357
357
|
case SLOG_TYPES.COSMIC_SWINGSET.RUN.FINISH: {
|
|
358
358
|
assert(!!triggerContext);
|
|
359
|
-
persistContext(
|
|
359
|
+
persistContext(
|
|
360
|
+
finalBody.remainingBeans && finalBody.remainingBeans > 0
|
|
361
|
+
? {}
|
|
362
|
+
: triggerContext,
|
|
363
|
+
);
|
|
360
364
|
triggerContext = null;
|
|
361
365
|
break;
|
|
362
366
|
}
|
|
@@ -373,9 +377,9 @@ export const makeContextualSlogProcessor = (
|
|
|
373
377
|
}
|
|
374
378
|
|
|
375
379
|
return {
|
|
376
|
-
attributes: /** @type {T & LogAttributes} */ (logAttributes),
|
|
377
380
|
body: finalBody,
|
|
378
|
-
|
|
381
|
+
attributes: /** @type {T & LogAttributes} */ (logAttributes),
|
|
382
|
+
time,
|
|
379
383
|
};
|
|
380
384
|
};
|
|
381
385
|
|
|
@@ -82,9 +82,9 @@ export const makeSlogSender = async options => {
|
|
|
82
82
|
* @param {import('./context-aware-slog.js').Slog} slog
|
|
83
83
|
*/
|
|
84
84
|
const slogSender = slog => {
|
|
85
|
-
const {
|
|
85
|
+
const { time, ...logRecord } = contextualSlogProcessor(slog);
|
|
86
86
|
|
|
87
|
-
const [secondsStr, fractionStr] = String(
|
|
87
|
+
const [secondsStr, fractionStr] = String(time).split('.');
|
|
88
88
|
const seconds = parseInt(secondsStr, 10);
|
|
89
89
|
const nanoSeconds = parseInt(
|
|
90
90
|
(fractionStr || String(0)).padEnd(9, String(0)).slice(0, 9),
|
package/src/slog-to-otel.js
CHANGED
|
@@ -976,7 +976,7 @@ export const makeSlogToOtelKit = (tracer, overrideAttrs = {}) => {
|
|
|
976
976
|
spans.pop('timer-poll');
|
|
977
977
|
break;
|
|
978
978
|
}
|
|
979
|
-
case 'cosmic-
|
|
979
|
+
case 'cosmic-swingset-inject-kernel-upgrade-events': {
|
|
980
980
|
spans.push('kernel-upgrade-events');
|
|
981
981
|
spans.pop('kernel-upgrade-events');
|
|
982
982
|
break;
|