Documentation
ΒΆ
Overview ΒΆ
Package omniobserve provides a unified interface for LLM, ML, and general service observability platforms.
This library abstracts common functionality across providers like:
- Comet Opik
- Arize Phoenix
- Langfuse
- New Relic
- Datadog
- OpenTelemetry (OTLP)
Quick Start - LLM Observability ΒΆ
Import the provider you want to use:
import ( "github.com/agentplexus/omniobserve/llmops" _ "github.com/agentplexus/go-opik/llmops" // Register Opik // or _ "github.com/agentplexus/omniobserve/llmops/langfuse" // Register Langfuse // or _ "github.com/agentplexus/go-phoenix/llmops" // Register Phoenix )
Then open a provider:
provider, err := llmops.Open("opik", llmops.WithAPIKey("..."))
if err != nil {
log.Fatal(err)
}
defer provider.Close()
Start tracing:
ctx, trace, _ := provider.StartTrace(ctx, "my-workflow")
defer trace.End()
ctx, span, _ := provider.StartSpan(ctx, "llm-call",
llmops.WithSpanType(llmops.SpanTypeLLM),
llmops.WithModel("gpt-4"),
)
defer span.End()
Quick Start - General Service Observability ΒΆ
Import the provider you want to use:
import ( "github.com/agentplexus/omniobserve/observops" _ "github.com/agentplexus/omniobserve/observops/otlp" // OTLP exporter // or _ "github.com/agentplexus/omniobserve/observops/newrelic" // New Relic // or _ "github.com/agentplexus/omniobserve/observops/datadog" // Datadog )
Then open a provider:
provider, err := observops.Open("otlp",
observops.WithEndpoint("localhost:4317"),
observops.WithServiceName("my-service"),
)
if err != nil {
log.Fatal(err)
}
defer provider.Shutdown(context.Background())
Use metrics, traces, and logs:
// Metrics
counter, _ := provider.Meter().Counter("requests_total")
counter.Add(ctx, 1, observops.WithAttributes(observops.Attribute("method", "GET")))
// Traces
ctx, span := provider.Tracer().Start(ctx, "ProcessRequest")
defer span.End()
// Logs
provider.Logger().Info(ctx, "Request processed", observops.LogAttr("user_id", "123"))
Architecture ΒΆ
The library is organized into three main packages:
- llmops: LLM observability (traces, spans, evaluations, prompts)
- mlops: ML operations (experiments, model registry, artifacts)
- observops: General service observability (metrics, traces, logs via OpenTelemetry)
Each package defines interfaces that providers implement. Provider-specific implementations are in subpackages (e.g., llmops/opik, observops/newrelic).
LLM Observability Providers ΒΆ
- opik: Comet Opik (open-source, self-hosted)
- langfuse: Langfuse (open-source, cloud & self-hosted)
- phoenix: Arize Phoenix (open-source, uses OpenTelemetry)
General Observability Providers ΒΆ
- otlp: OpenTelemetry Protocol (vendor-agnostic)
- newrelic: New Relic
- datadog: Datadog
Features ΒΆ
LLM Observability:
- Trace/span creation and context propagation
- Input/output capture
- Token usage and cost tracking
- Feedback scores and evaluations
- Dataset management
- Prompt versioning (provider-dependent)
General Observability:
- Metrics (counters, gauges, histograms)
- Distributed tracing with spans
- Structured logging with trace correlation
- Vendor-agnostic via OpenTelemetry
SDK Access ΒΆ
For provider-specific features, you can use the underlying SDKs directly:
import "github.com/agentplexus/go-opik" // Opik SDK import "github.com/agentplexus/go-phoenix" // Phoenix SDK import "github.com/agentplexus/omniobserve/sdk/langfuse"
Index ΒΆ
- Constants
- Variables
- func ObservopsProviders() []string
- func OpenLLMOps(name string, opts ...llmops.ClientOption) (llmops.Provider, error)
- func OpenObservops(name string, opts ...observops.ClientOption) (observops.Provider, error)
- func Providers() []string
- type Counter
- type EvalInput
- type EvalResult
- type Experiment
- type Gauge
- type Histogram
- type Logger
- type MLProvider
- type Meter
- type Model
- type ObservopsProvider
- type ObservopsSpan
- type Provider
- type Run
- type Span
- type SpanType
- type TokenUsage
- type Trace
- type Tracer
Constants ΒΆ
const ( SpanTypeGeneral = llmops.SpanTypeGeneral SpanTypeLLM = llmops.SpanTypeLLM SpanTypeTool = llmops.SpanTypeTool SpanTypeRetrieval = llmops.SpanTypeRetrieval SpanTypeAgent = llmops.SpanTypeAgent SpanTypeChain = llmops.SpanTypeChain SpanTypeGuardrail = llmops.SpanTypeGuardrail )
Span type constants.
const Version = "0.1.0"
Version is the library version.
Variables ΒΆ
var ( // Client options WithAPIKey = llmops.WithAPIKey WithEndpoint = llmops.WithEndpoint WithWorkspace = llmops.WithWorkspace WithProjectName = llmops.WithProjectName WithHTTPClient = llmops.WithHTTPClient WithTimeout = llmops.WithTimeout WithDisabled = llmops.WithDisabled WithDebug = llmops.WithDebug // Trace options WithTraceProject = llmops.WithTraceProject WithTraceInput = llmops.WithTraceInput WithTraceOutput = llmops.WithTraceOutput WithTraceMetadata = llmops.WithTraceMetadata WithTraceTags = llmops.WithTraceTags WithThreadID = llmops.WithThreadID // Span options WithSpanType = llmops.WithSpanType WithSpanInput = llmops.WithSpanInput WithSpanOutput = llmops.WithSpanOutput WithSpanMetadata = llmops.WithSpanMetadata WithSpanTags = llmops.WithSpanTags WithModel = llmops.WithModel WithProvider = llmops.WithProvider WithTokenUsage = llmops.WithTokenUsage // End options WithEndOutput = llmops.WithEndOutput WithEndMetadata = llmops.WithEndMetadata WithEndError = llmops.WithEndError )
Re-export option functions for convenience.
var ( // Observops client options ObsWithServiceName = observops.WithServiceName ObsWithServiceVersion = observops.WithServiceVersion ObsWithEndpoint = observops.WithEndpoint ObsWithAPIKey = observops.WithAPIKey ObsWithInsecure = observops.WithInsecure ObsWithHeaders = observops.WithHeaders ObsWithResource = observops.WithResource ObsWithBatchTimeout = observops.WithBatchTimeout ObsWithBatchSize = observops.WithBatchSize ObsWithDisabled = observops.WithDisabled ObsWithDebug = observops.WithDebug // Metric options ObsWithDescription = observops.WithDescription ObsWithUnit = observops.WithUnit // Record options ObsWithAttributes = observops.WithAttributes // Span options ObsWithSpanKind = observops.WithSpanKind ObsWithSpanAttributes = observops.WithSpanAttributes ObsWithSpanLinks = observops.WithSpanLinks // Attribute helper ObsAttribute = observops.Attribute ObsLogAttr = observops.LogAttr )
Re-export observops option functions for convenience.
Functions ΒΆ
func ObservopsProviders ΒΆ
func ObservopsProviders() []string
ObservopsProviders returns the names of registered general observability providers.
func OpenLLMOps ΒΆ
OpenLLMOps opens an LLM observability provider. This is a convenience function that wraps llmops.Open.
func OpenObservops ΒΆ
OpenObservops opens a general observability provider. This is a convenience function that wraps observops.Open.
Types ΒΆ
type EvalResult ΒΆ
type EvalResult = llmops.EvalResult
EvalResult is an alias for llmops.EvalResult.
type ObservopsProvider ΒΆ
ObservopsProvider is an alias for observops.Provider.
type ObservopsSpan ΒΆ
ObservopsSpan is an alias for observops.Span.
type TokenUsage ΒΆ
type TokenUsage = llmops.TokenUsage
TokenUsage is an alias for llmops.TokenUsage.
Directories
ΒΆ
| Path | Synopsis |
|---|---|
|
Package agentops provides observability for multi-agent systems.
|
Package agentops provides observability for multi-agent systems. |
|
middleware
Package middleware provides reusable instrumentation helpers for multi-agent systems.
|
Package middleware provides reusable instrumentation helpers for multi-agent systems. |
|
postgres
Package postgres provides a PostgreSQL backend for agentops using Ent.
|
Package postgres provides a PostgreSQL backend for agentops using Ent. |
|
examples
|
|
|
evaluation
command
Example: evaluation
|
Example: evaluation |
|
integrations
|
|
|
observability
Package observability provides integration helpers for using observops with multi-agent systems and general Go applications.
|
Package observability provides integration helpers for using observops with multi-agent systems and general Go applications. |
|
omnillm
Package omnillm provides an ObservabilityHook implementation for OmniLLM that integrates with OmniObserve's llmops providers (Opik, Langfuse, Phoenix).
|
Package omnillm provides an ObservabilityHook implementation for OmniLLM that integrates with OmniObserve's llmops providers (Opik, Langfuse, Phoenix). |
|
Package llmops provides a unified interface for LLM observability platforms.
|
Package llmops provides a unified interface for LLM observability platforms. |
|
langfuse
Package langfuse provides a Langfuse adapter for the llmops abstraction.
|
Package langfuse provides a Langfuse adapter for the llmops abstraction. |
|
metrics
Package metrics provides evaluation metrics for LLM observability.
|
Package metrics provides evaluation metrics for LLM observability. |
|
Package mlops provides interfaces for ML operations platforms.
|
Package mlops provides interfaces for ML operations platforms. |
|
Package observops provides a unified interface for general service observability platforms.
|
Package observops provides a unified interface for general service observability platforms. |
|
datadog
Package datadog provides a Datadog observability provider for observops.
|
Package datadog provides a Datadog observability provider for observops. |
|
newrelic
Package newrelic provides a New Relic observability provider for observops.
|
Package newrelic provides a New Relic observability provider for observops. |
|
otlp
Package otlp provides an OpenTelemetry Protocol (OTLP) exporter for observops.
|
Package otlp provides an OpenTelemetry Protocol (OTLP) exporter for observops. |
|
sdk
|
|
|
langfuse
Package langfuse provides a Go SDK for Langfuse, an open-source LLM observability platform.
|
Package langfuse provides a Go SDK for Langfuse, an open-source LLM observability platform. |
|
semconv
|
|
|
agent
Package agent provides OpenTelemetry semantic conventions for Agentic AI.
|
Package agent provides OpenTelemetry semantic conventions for Agentic AI. |