Files
openclaw/src/plugin-sdk/diagnostic-runtime.ts
Alex Knight f824e1596a Add OpenTelemetry LLM content spans (#86191)
* feat: add otel llm content spans

* fix: gate otel tool definitions separately

* fix(diagnostics): sanitize tool_call parts and truncate oversized OTEL content attributes

* fix: keep otel content truncation parseable

* fix: simplify codex model diagnostics

* fix(diagnostics): align opt-in GenAI span shape

* test(codex): align resume params after rebase

* fix(diagnostics): keep model content off shared event bus

* test(diagnostics): keep extension tests on sdk boundary

---------

Co-authored-by: Alex Knight <15041791+amknight@users.noreply.github.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-05-26 02:24:02 +01:00

36 lines
1.3 KiB
TypeScript

// Diagnostic flag/event helpers for plugins that want narrow runtime gating.
export { isDiagnosticFlagEnabled } from "../infra/diagnostic-flags.js";
export type {
DiagnosticEventMetadata,
DiagnosticEventPayload,
DiagnosticEventPrivateData,
DiagnosticModelCallContent,
} from "../infra/diagnostic-events.js";
export type { DiagnosticModelContentCapturePolicy } from "../infra/diagnostic-llm-content.js";
export {
emitDiagnosticEvent,
emitTrustedDiagnosticEvent,
emitTrustedDiagnosticEventWithPrivateData,
hasPendingInternalDiagnosticEvent,
isInternalDiagnosticEventMetadata,
isDiagnosticsEnabled,
onInternalDiagnosticEvent,
onDiagnosticEvent,
resetDiagnosticEventsForTest,
waitForDiagnosticEventsDrained,
} from "../infra/diagnostic-events.js";
export { resolveDiagnosticModelContentCapturePolicy } from "../infra/diagnostic-llm-content.js";
export type { DiagnosticTraceContext } from "../infra/diagnostic-trace-context.js";
export {
createChildDiagnosticTraceContext,
createDiagnosticTraceContext,
createDiagnosticTraceContextFromActiveScope,
freezeDiagnosticTraceContext,
formatDiagnosticTraceparent,
isValidDiagnosticSpanId,
isValidDiagnosticTraceFlags,
isValidDiagnosticTraceId,
parseDiagnosticTraceparent,
} from "../infra/diagnostic-trace-context.js";