Documentation
ΒΆ
Overview ΒΆ
Package metaobserve provides a unified interface for LLM and ML observability platforms.
This library abstracts common functionality across providers like:
- Comet Opik
- Arize Phoenix
- Langfuse
- Lunary
- MLflow
- Weights & Biases
Quick Start ΒΆ
Import the provider you want to use:
import ( "github.com/grokify/metaobserve/llmops" _ "github.com/grokify/metaobserve/llmops/opik" // Register Opik // or _ "github.com/grokify/metaobserve/llmops/langfuse" // Register Langfuse // or _ "github.com/grokify/metaobserve/llmops/phoenix" // 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()
Architecture ΒΆ
The library is organized into two main packages:
- llmops: LLM observability (traces, spans, evaluations, prompts)
- mlops: ML operations (experiments, model registry, artifacts)
Each package defines interfaces that providers implement. Provider-specific implementations are in subpackages (e.g., llmops/opik, llmops/langfuse).
Providers ΒΆ
Available LLM observability providers:
- opik: Comet Opik (open-source, self-hosted)
- langfuse: Langfuse (open-source, cloud & self-hosted)
- phoenix: Arize Phoenix (open-source, uses OpenTelemetry)
Features ΒΆ
Common features across providers:
- Trace/span creation and context propagation
- Input/output capture
- Token usage and cost tracking
- Feedback scores and evaluations
- Dataset management
- Prompt versioning (provider-dependent)
SDK Access ΒΆ
For provider-specific features, you can use the underlying SDKs directly:
import "github.com/grokify/metaobserve/sdk/langfuse" import "github.com/grokify/metaobserve/sdk/phoenix"
Or use the existing Opik SDK:
import "github.com/grokify/go-comet-ml-opik"
Index ΒΆ
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.
Functions ΒΆ
func OpenLLMOps ΒΆ
OpenLLMOps opens an LLM observability provider. This is a convenience function that wraps llmops.Open.
Types ΒΆ
type EvalResult ΒΆ
type EvalResult = llmops.EvalResult
EvalResult is an alias for llmops.EvalResult.
type TokenUsage ΒΆ
type TokenUsage = llmops.TokenUsage
TokenUsage is an alias for llmops.TokenUsage.
Directories
ΒΆ
| Path | Synopsis |
|---|---|
|
integrations
|
|
|
metallm
Package metallm provides an ObservabilityHook implementation for MetaLLM that integrates with MetaObserve's llmops providers (Opik, Langfuse, Phoenix).
|
Package metallm provides an ObservabilityHook implementation for MetaLLM that integrates with MetaObserve'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. |
|
opik
Package opik provides an Opik adapter for the llmops abstraction.
|
Package opik provides an Opik adapter for the llmops abstraction. |
|
phoenix
Package phoenix provides a Phoenix adapter for the llmops abstraction.
|
Package phoenix provides a Phoenix adapter for the llmops abstraction. |
|
Package mlops provides interfaces for ML operations platforms.
|
Package mlops provides interfaces for ML operations platforms. |
|
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. |
|
phoenix
Package phoenix provides a Go SDK for Arize Phoenix, an open-source LLM observability platform.
|
Package phoenix provides a Go SDK for Arize Phoenix, an open-source LLM observability platform. |