Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Enabled bool
ServiceName string
BatchTimeout time.Duration
LogWriter io.Writer // File to write OTel logs to (required when enabled)
Endpoint string // OTLP endpoint (optional, only used if set)
Insecure bool // Use insecure connection for OTLP
}
Config holds OTel configuration
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider manages OpenTelemetry providers for logs and metrics
func New ¶
New creates a new OTel provider with the given configuration. If OTel is disabled, returns a no-op provider.
func (*Provider) Flush ¶
Flush forces a flush of all pending logs. Use this during mission save to ensure all data is exported.
func (*Provider) LoggerProvider ¶
func (p *Provider) LoggerProvider() *sdklog.LoggerProvider
LoggerProvider returns the log provider for use with otelslog bridge. Returns nil if OTel is not enabled.
Click to show internal directories.
Click to hide internal directories.