@pristine-ts/telemetry 2.0.5 → 2.0.7

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.
@@ -100,7 +100,7 @@ export declare class TracingManager implements TracingManagerInterface {
100
100
  */
101
101
  endTrace(): void;
102
102
  /**
103
- * Attaches a named, timestamped event to the most-recently-started in-progress span.
103
+ * Attaches a named, timestamped marker to the most-recently-started in-progress span.
104
104
  * Use for noteworthy moments that don't warrant a child span — "validation passed",
105
105
  * "found 50 rows", "rate limit ok". Cheap (just pushes onto an array); shows up in
106
106
  * the trace rendered by tracers (ConsoleTracer, FileTracer, X-Ray, etc.).
@@ -110,17 +110,17 @@ export declare class TracingManager implements TracingManagerInterface {
110
110
  * that "this marker call had nowhere to go" — usually the sign of a missing
111
111
  * `startTracing()` call earlier in the flow.
112
112
  */
113
- addEventToCurrentSpan(message: string, attributes?: {
113
+ addMarkerToCurrentSpan(message: string, attributes?: {
114
114
  [key: string]: string;
115
115
  }): void;
116
116
  /**
117
- * Returns the active trace's spans + their events as a flat, timestamp-sorted list of
117
+ * Returns the active trace's spans + their markers as a flat, timestamp-sorted list of
118
118
  * `{kind, name, date, attributes}` entries. Public utility for custom tracers, debug
119
119
  * endpoints, test helpers, or anyone who wants "the active trace as a flat list."
120
120
  * Returns an empty array when no active trace exists.
121
121
  */
122
122
  getCurrentTrail(): Array<{
123
- kind: "span" | "event";
123
+ kind: "span" | "marker";
124
124
  name: string;
125
125
  date: Date;
126
126
  attributes: {
@@ -129,7 +129,7 @@ export declare class TracingManager implements TracingManagerInterface {
129
129
  }>;
130
130
  /**
131
131
  * Finds the deepest in-progress span — the leaf of the still-open subtree. Used as
132
- * the target for `addEventToCurrentSpan`. Intuition: events attach to whatever is
132
+ * the target for `addMarkerToCurrentSpan`. Intuition: markers attach to whatever is
133
133
  * currently open at the bottom of the call stack.
134
134
  *
135
135
  * Walking the in-progress subtree (rather than ranking all spans by start date)
@@ -1,3 +1,3 @@
1
- export * from "./span-event.model";
1
+ export * from "./span-marker.model";
2
2
  export * from "./span.model";
3
3
  export * from "./trace.model";
@@ -0,0 +1 @@
1
+ export { SpanMarker } from "@pristine-ts/common";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pristine-ts/telemetry",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "description": "",
5
5
  "module": "dist/lib/esm/telemetry.module.js",
6
6
  "main": "dist/lib/cjs/telemetry.module.js",
@@ -12,8 +12,8 @@
12
12
  "test:cov": "jest --coverage"
13
13
  },
14
14
  "dependencies": {
15
- "@pristine-ts/common": "^2.0.5",
16
- "@pristine-ts/logging": "^2.0.5",
15
+ "@pristine-ts/common": "^2.0.7",
16
+ "@pristine-ts/logging": "^2.0.7",
17
17
  "uuid": "^9.0.1"
18
18
  },
19
19
  "devDependencies": {
@@ -61,7 +61,7 @@
61
61
  "src/*.{js,ts}"
62
62
  ]
63
63
  },
64
- "gitHead": "9a960b330ee1961bb9a6151ce50257c4d8ccd48d",
64
+ "gitHead": "8788c711f72b7ebdcec76bc8f6a56d51af143087",
65
65
  "repository": {
66
66
  "type": "git",
67
67
  "url": "https://github.com/magieno/pristine-ts.git",
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SpanEvent = void 0;
4
- var common_1 = require("@pristine-ts/common");
5
- Object.defineProperty(exports, "SpanEvent", { enumerable: true, get: function () { return common_1.SpanEvent; } });
6
- //# sourceMappingURL=span-event.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"span-event.model.js","sourceRoot":"","sources":["../../../../src/models/span-event.model.ts"],"names":[],"mappings":";;;AAAA,8CAA8C;AAAtC,mGAAA,SAAS,OAAA"}
@@ -1,2 +0,0 @@
1
- export { SpanEvent } from "@pristine-ts/common";
2
- //# sourceMappingURL=span-event.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"span-event.model.js","sourceRoot":"","sources":["../../../../src/models/span-event.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC"}
@@ -1 +0,0 @@
1
- export { SpanEvent } from "@pristine-ts/common";