@runtypelabs/flue-otel 0.5.7 → 0.5.8

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/README.md CHANGED
@@ -172,6 +172,20 @@ specifically, and a run whose envelope never arrives is recorded as still in
172
172
  flight. Wire the shutdown. In a serverless handler, `await provider.forceFlush()`
173
173
  before returning.
174
174
 
175
+ `forceFlush()` rejects when the export fails or exceeds its timeout. Catch the
176
+ rejection, or a flush in a `finally` block fails the handler after the agent's
177
+ own work succeeded:
178
+
179
+ ```ts
180
+ try {
181
+ return await runAgent(request)
182
+ } finally {
183
+ await provider.forceFlush().catch((error) => {
184
+ console.error('Telemetry flush failed', error)
185
+ })
186
+ }
187
+ ```
188
+
175
189
  The disposer returned by `instrument()` ends any still-open span as
176
190
  `interrupted`, folding the usage and iteration count seen so far onto the
177
191
  envelope first. It does not flush.
package/dist/index.cjs CHANGED
@@ -385,7 +385,7 @@ function isHighSurrogate(code) {
385
385
  }
386
386
  //#endregion
387
387
  //#region package.json
388
- var version = "0.5.7";
388
+ var version = "0.5.8";
389
389
  //#endregion
390
390
  //#region src/semconv.ts
391
391
  /**
package/dist/index.mjs CHANGED
@@ -384,7 +384,7 @@ function isHighSurrogate(code) {
384
384
  }
385
385
  //#endregion
386
386
  //#region package.json
387
- var version = "0.5.7";
387
+ var version = "0.5.8";
388
388
  //#endregion
389
389
  //#region src/semconv.ts
390
390
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/flue-otel",
3
- "version": "0.5.7",
3
+ "version": "0.5.8",
4
4
  "description": "OpenTelemetry instrumentation for Flue agents that emits GenAI semconv spans plus Runtype's runtype.* extension vocabulary, so a Flue run lands in Runtype at full fidelity.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -32,8 +32,8 @@
32
32
  "@opentelemetry/api": "^1.9.0",
33
33
  "@opentelemetry/context-async-hooks": "^2.1.0",
34
34
  "@opentelemetry/sdk-trace-base": "^2.1.0",
35
- "@runtypelabs/execution-ingest": "0.15.20",
36
- "@runtypelabs/shared": "3.79.1",
35
+ "@runtypelabs/execution-ingest": "0.16.3",
36
+ "@runtypelabs/shared": "3.85.0",
37
37
  "tsdown": "^0.23.0",
38
38
  "typescript": "^6.0.3",
39
39
  "vitest": "^5.0.2"