Documentation
¶
Index ¶
- type OTelTracingProcessor
- func (o *OTelTracingProcessor) Flush()
- func (o *OTelTracingProcessor) OnSpanEnd(s *agent.Span)
- func (o *OTelTracingProcessor) OnSpanStart(s *agent.Span)
- func (o *OTelTracingProcessor) OnTraceEnd(trace *agent.Trace)
- func (o *OTelTracingProcessor) OnTraceStart(trace *agent.Trace)
- func (o *OTelTracingProcessor) SetOnTraceIDReady(fn func(traceID string))
- func (o *OTelTracingProcessor) Shutdown(ctx context.Context) error
- func (o *OTelTracingProcessor) TraceID() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OTelTracingProcessor ¶
type OTelTracingProcessor struct {
// contains filtered or unexported fields
}
OTelTracingProcessor bridges our TracingProcessor interface to the OpenTelemetry SDK. It maps Span/agent.SpanData to OTel spans with semantic attributes, exporting via any OTLP-compatible backend.
func NewOTelTracingProcessor ¶
func NewOTelTracingProcessor(ctx context.Context, serviceName string) (*OTelTracingProcessor, error)
NewOTelTracingProcessor creates a processor that exports spans to stdout.
func NewOTelTracingProcessorWithEndpoint ¶
func NewOTelTracingProcessorWithEndpoint(ctx context.Context, serviceName, endpoint string) (*OTelTracingProcessor, error)
NewOTelTracingProcessorWithEndpoint creates a processor that exports spans to an explicit OTLP gRPC endpoint. Leave endpoint empty for stdout.
func (*OTelTracingProcessor) Flush ¶
func (o *OTelTracingProcessor) Flush()
func (*OTelTracingProcessor) OnSpanEnd ¶
func (o *OTelTracingProcessor) OnSpanEnd(s *agent.Span)
func (*OTelTracingProcessor) OnSpanStart ¶
func (o *OTelTracingProcessor) OnSpanStart(s *agent.Span)
func (*OTelTracingProcessor) OnTraceEnd ¶
func (o *OTelTracingProcessor) OnTraceEnd(trace *agent.Trace)
func (*OTelTracingProcessor) OnTraceStart ¶
func (o *OTelTracingProcessor) OnTraceStart(trace *agent.Trace)
func (*OTelTracingProcessor) SetOnTraceIDReady ¶
func (o *OTelTracingProcessor) SetOnTraceIDReady(fn func(traceID string))
SetOnTraceIDReady registers a callback fired once when the first trace starts and the OTel trace ID becomes available. This allows writing the trace ID to external storage (e.g. CRD) early for live trace viewing.
func (*OTelTracingProcessor) Shutdown ¶
func (o *OTelTracingProcessor) Shutdown(ctx context.Context) error
Shutdown flushes pending spans and shuts down the provider.
func (*OTelTracingProcessor) TraceID ¶
func (o *OTelTracingProcessor) TraceID() string
TraceID returns the OTel trace ID (hex string) of the root trace. Returns empty string if no trace has been started.