Skip to content

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 AliasDescription
OpenInferenceSpanKindCanonical OpenInference span-kind enum.

Variables

VariableDescription
OPEN_INFERENCE_EXCLUDED_TYPESSpan 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_TABLEFull canonical span-to-kind table — exposed for tooling and tests that need to introspect the mapping.

Functions

FunctionDescription
emitOpenInferenceKindAttach 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.
openInferenceKindForResolve the OpenInference span kind for a Graphorin span type. Returns null for types intentionally excluded from emission.