Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/observability / openinference
openinference
OpenInference span-kind emission. Adds the openinference.span.kind attribute (one of AGENT, EVALUATOR, LLM, TOOL, RETRIEVER, EMBEDDING, CHAIN) to applicable Graphorin spans.
The mapping is the canonical table published in the architecture documentation. Span types without a clean OpenInference equivalent (skill.*, mcp.connect, mcp.list-tools, replay.*) are NOT emitted — the caller can introspect via openInferenceKindFor and decide whether to log a fallback attribute.
Type Aliases
| Type Alias | Description |
|---|---|
| OpenInferenceSpanKind | Canonical OpenInference span-kind enum. |
Variables
| Variable | Description |
|---|---|
| OPEN_INFERENCE_EXCLUDED_TYPES | Span types intentionally excluded from OpenInference span-kind emission per the canonical table — skill.*, mcp.connect, mcp.list-tools, and replay.* markers do not have a clean OpenInference equivalent. |
| OPEN_INFERENCE_KIND_TABLE | Full canonical span-to-kind table — exposed for tooling and tests that need to introspect the mapping. |
Functions
| Function | Description |
|---|---|
| emitOpenInferenceKind | Attach the openinference.span.kind attribute to a span. No-op for span types that lack a clean OpenInference equivalent. The attribute is tagged 'public' because the enum value is bounded and contains no PII. |
| openInferenceKindFor | Resolve the OpenInference span kind for a Graphorin span type. Returns null for types intentionally excluded from emission. |