Maven Central Repository: https://central.sonatype.com/search?q=arize
openinference/java at main · Arize-ai/openinference
GitHub
Overview of Packages
OpenInference Java is part of the OpenInference project. The Java SDK consists of three main packages:- openinference-semantic-conventions: Java constants for OpenInference semantic conventions
- openinference-instrumentation:
- openinference-instrumentation-langchain4j: Auto-instrumentation for LangChain4j applications
- openinference-instrumentation-springAI: Auto-instrumentation for Spring AI applications
openinference-semantic-conventions
This package provides Java constants for OpenInference semantic conventions. Semantic conventions are standardized attribute names and values that ensure consistent tracing across different LLM providers, models, and frameworks. They define a common vocabulary for describing LLM operations, making it easier to analyze and compare traces from different sources. OpenInference semantic conventions include standardized attributes for:- Span Kinds: LLM, Chain, Tool, Agent, Retriever, Embedding, Reranker, Guardrail, Evaluator
- Attributes: Model names, token counts, prompts, completions, embeddings, etc.
openinference-instrumentation
This package provides base instrumentation utilities for creating customized manual tracesopeninference-instrumentation-langchain4j
This package provides auto-instrumentation for LangChain4j applications, automatically capturing traces from LangChain4j components:Prerequisites
- Java 11 or higher
- OpenTelemetry Java 1.49.0 or higher
- (Optional) Phoenix API key if using auth
Gradle
Add the dependencies to yourbuild.gradle:
Maven
Add the dependencies to yourpom.xml:
Quick Start
Manual Instrumentation
Auto-instrumentation (with LangChain4j)
Environment Configuration Example for Phoenix Tracing
Set your Phoenix credentials as environment variables:Observability in Phoenix
Once configured, your OpenInference traces will be automatically sent to Phoenix where you can:- Monitor Performance: Track latency, throughput, and error rates
- Analyze Usage: View token usage, model performance, and cost metrics
- Debug Issues: Trace request flows and identify bottlenecks
- Evaluate Quality: Run evaluations on your LLM outputs
Support
- Slack: Join our community
- GitHub Issues: OpenInference Repository

