@opvious/stl-telemetry
Advanced tools
@@ -23,2 +23,3 @@ import * as otel from '@opentelemetry/api'; | ||
| readonly events: SpanEventRecord[]; | ||
| readonly links: otel.Link[]; | ||
| status: otel.SpanStatus | undefined; | ||
@@ -38,2 +39,4 @@ readonly ended: Promise<void>; | ||
| recordException(exc: otel.Exception): void; | ||
| addLink(link: otel.Link): this; | ||
| addLinks(links: otel.Link[]): this; | ||
| } | ||
@@ -40,0 +43,0 @@ export interface SpanRecord { |
@@ -61,2 +61,3 @@ import * as otel from '@opentelemetry/api'; | ||
| this.events = []; | ||
| this.links = []; | ||
| this.context = randomSpanContext(); | ||
@@ -102,2 +103,10 @@ const [ended, onEnd] = resolvable(); | ||
| } | ||
| addLink(link) { | ||
| this.links.push(link); | ||
| return this; | ||
| } | ||
| addLinks(links) { | ||
| this.links.push(...links); | ||
| return this; | ||
| } | ||
| } | ||
@@ -104,0 +113,0 @@ function randomSpanContext() { |
+7
-7
| { | ||
| "name": "@opvious/stl-telemetry", | ||
| "version": "0.25.6", | ||
| "version": "0.26.0", | ||
| "repository": "github:opvious/stl.ts", | ||
@@ -21,12 +21,12 @@ "description": "Standard telemetry library", | ||
| "pino-std-serializers": "^7.0.0", | ||
| "@opvious/stl-errors": "0.25.6", | ||
| "@opvious/stl-utils": "0.25.6" | ||
| "@opvious/stl-errors": "0.26.0", | ||
| "@opvious/stl-utils": "0.26.0" | ||
| }, | ||
| "peerDependencies": { | ||
| "@opentelemetry/api": "~1.8.0" | ||
| "@opentelemetry/api": "~1.9.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@opentelemetry/api": "~1.8.0", | ||
| "@opentelemetry/core": "^1.25.1", | ||
| "@opentelemetry/sdk-trace-node": "^1.25.1", | ||
| "@opentelemetry/api": "~1.9.0", | ||
| "@opentelemetry/core": "^1.28.0", | ||
| "@opentelemetry/sdk-trace-node": "^1.28.0", | ||
| "ts-essentials": "^10.0.1" | ||
@@ -33,0 +33,0 @@ }, |
64649
0.46%1388
0.87%+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
Updated
Updated