@glassflow-ai/rius 0.5.0 → 0.6.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/README.md +12 -7
- package/dist/index.cjs +469 -108
- package/dist/index.d.cts +108 -6
- package/dist/index.d.ts +108 -6
- package/dist/index.js +455 -95
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -39,7 +39,8 @@ await client.ready;
|
|
|
39
39
|
|
|
40
40
|
// 1. Function wrapper — trace a whole call. Use a named function expression
|
|
41
41
|
// (or pass { name }): an arrow function has no inferrable name and its
|
|
42
|
-
// span would fall back to "anonymous".
|
|
42
|
+
// span would fall back to "anonymous". The wrapper always returns a
|
|
43
|
+
// Promise, even for a synchronous function.
|
|
43
44
|
const handle = observe(async function handle(query: string) {
|
|
44
45
|
return await callModel(query);
|
|
45
46
|
});
|
|
@@ -232,12 +233,13 @@ variables, then the defaults below.
|
|
|
232
233
|
| `disabled` | `RIUS_DISABLED` | `false` |
|
|
233
234
|
| `sampleRate` | `RIUS_SAMPLE_RATE` | `1.0` |
|
|
234
235
|
| `captureContent` | `RIUS_CAPTURE_CONTENT` | `true` |
|
|
235
|
-
| `mask` | (options only) | none
|
|
236
|
+
| `mask` | (options only) | none (`(value, { key }) => unknown`; the return value is stored, JSON-encoded if not a primitive; return `""` to blank) |
|
|
236
237
|
| `heartbeat` | `RIUS_HEARTBEAT` | `true` |
|
|
237
238
|
| `heartbeatInterval` | `RIUS_HEARTBEAT_INTERVAL` | `15` (seconds; clamped 5-300) |
|
|
238
239
|
| `agentName` | `RIUS_AGENT_NAME` | `serviceName` |
|
|
239
240
|
| `partialSpans` | `RIUS_PARTIAL_SPANS` | `false` |
|
|
240
241
|
| `partialSpansDelay` | `RIUS_PARTIAL_SPANS_DELAY` | `0` (seconds; clamped 0-60) |
|
|
242
|
+
| `sessionId` | `RIUS_SESSION_ID` | none (process-wide session default; `withSession` overrides it) |
|
|
241
243
|
|
|
242
244
|
Traces are posted to `<endpoint>/v1/traces`.
|
|
243
245
|
|
|
@@ -249,11 +251,14 @@ attributes of span events and links. With `captureContent: false` the
|
|
|
249
251
|
message and stacktrace of a recorded exception are stripped as well,
|
|
250
252
|
since provider errors routinely echo the request back; the exception
|
|
251
253
|
event and its `exception.type` are kept, so failures stay visible.
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
`captureContent
|
|
254
|
+
The span's ERROR status message carries the same string, so it is
|
|
255
|
+
blanked too; the status code stays. A `mask` function scrubs content
|
|
256
|
+
attributes on spans, events and links, and runs over the status message
|
|
257
|
+
as well (its `key` is `status.description`). It does not reach the
|
|
258
|
+
exception event: with `captureContent: true`, exception messages and
|
|
259
|
+
stacktraces pass through unmasked, so a raw provider error can still
|
|
260
|
+
reach your backend that way. Disable `captureContent` if you need those
|
|
261
|
+
scrubbed too.
|
|
257
262
|
|
|
258
263
|
`disabled` turns the SDK off completely: nothing is exported, and no
|
|
259
264
|
optional integration is loaded, so no third-party module is patched in your
|