Overview
The@arizeai/openinference-semantic-conventions package provides TypeScript constants for OpenInference tracing attributes. These conventions ensure consistent attribute names across traces.
Installation
Package Exports
The package exports constants for trace attributes and resource attributes:Span Kinds
OpenInference defines semantic span kinds for AI/LLM operations:Usage Example
Input/Output Attributes
Standard attributes for span inputs and outputs:Available MIME Types
LLM Attributes
Attributes specific to LLM operations:Message Attributes
For chat completions with message arrays:Retrieval Attributes
For document retrieval operations:Embedding Attributes
For embedding operations:Tool Attributes
For function/tool calling:Context Attributes
For session and user tracking:Resource Attributes
For identifying the project:Semantic Conventions Object
TheSemanticConventions export provides all attribute keys:
Best Practices
Next Steps
Core Package
Use attribute helpers from openinference-core
Instrumentations
Auto-instrument your LLM frameworks