@runtypelabs/flue-otel 0.5.6 → 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 +14 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +5 -5
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
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runtypelabs/flue-otel",
|
|
3
|
-
"version": "0.5.
|
|
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.
|
|
36
|
-
"@runtypelabs/shared": "3.
|
|
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"
|
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
"build": "tsdown",
|
|
70
70
|
"dev": "tsdown --watch",
|
|
71
71
|
"clean": "rm -rf dist",
|
|
72
|
-
"typecheck": "
|
|
72
|
+
"typecheck": "bun check && bun check -p tsconfig.tests.json",
|
|
73
73
|
"test": "vitest run",
|
|
74
74
|
"test:watch": "vitest watch",
|
|
75
|
-
"lint": "
|
|
75
|
+
"lint": "oxlint . --max-warnings 0"
|
|
76
76
|
}
|
|
77
77
|
}
|