Documentation
¶
Overview ¶
Package otlp provides an OpenTelemetry Protocol (OTLP) exporter for observops. OTLP is vendor-agnostic and can export telemetry to any OTLP-compatible backend including the OpenTelemetry Collector, Jaeger, Tempo, New Relic, Datadog, and others.
Usage ¶
import (
"github.com/agentplexus/omniobserve/observops"
_ "github.com/agentplexus/omniobserve/observops/otlp"
)
provider, err := observops.Open("otlp",
observops.WithEndpoint("localhost:4317"),
observops.WithServiceName("my-service"),
)
Endpoints ¶
The OTLP exporter supports both gRPC and HTTP protocols:
- gRPC: localhost:4317 (default)
- HTTP: localhost:4318
Environment Variables ¶
The exporter respects standard OpenTelemetry environment variables:
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_HEADERS
- OTEL_SERVICE_NAME
- OTEL_RESOURCE_ATTRIBUTES
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements observops.Provider using OpenTelemetry OTLP exporters.
func (*Provider) ForceFlush ¶
ForceFlush forces any buffered telemetry to be exported.
Click to show internal directories.
Click to hide internal directories.