Documentation
¶
Overview ¶
Package tracing provides OpenTelemetry tracing for the unikernel engine daemon.
Index ¶
- Constants
- func RecordError(span trace.Span, err error)
- func SpanWithDuration(span trace.Span, d time.Duration)
- func SpanWithRetryAttrs(span trace.Span, policy vm.RestartPolicy, count int)
- func StartVMCreateSpan(ctx context.Context, cfg vm.Config) (trace.Span, context.Context)
- func StartVMKillSpan(ctx context.Context, id string) (trace.Span, context.Context)
- func StartVMLifecycleSpan(ctx context.Context, v *vm.VM, event string) (trace.Span, context.Context)
- func StartVMRemoveSpan(ctx context.Context, id string) (trace.Span, context.Context)
- func StartVMStartSpan(ctx context.Context, id string) (trace.Span, context.Context)
- func StartVMStopSpan(ctx context.Context, id string) (trace.Span, context.Context)
- func Tracer() trace.Tracer
- type Provider
Constants ¶
const ( VMLifecycleSpanName = "vm.lifecycle" VMCreateSpanName = "vm.create" VMStartSpanName = "vm.start" VMStopSpanName = "vm.stop" VMKillSpanName = "vm.kill" VMSignalSpanName = "vm.signal" VMRemoveSpanName = "vm.remove" VMMonitorSpanName = "vm.monitor" )
Variables ¶
This section is empty.
Functions ¶
func RecordError ¶
RecordError records an error on the span and sets its status to Error.
func SpanWithDuration ¶
SpanWithDuration adds a duration attribute to a span.
func SpanWithRetryAttrs ¶
func SpanWithRetryAttrs(span trace.Span, policy vm.RestartPolicy, count int)
SpanWithRetryAttrs adds retry-related attributes to a span.
func StartVMCreateSpan ¶
StartVMCreateSpan creates a span for a VM creation.
func StartVMKillSpan ¶
StartVMKillSpan creates a span for killing a VM.
func StartVMLifecycleSpan ¶
func StartVMLifecycleSpan(ctx context.Context, v *vm.VM, event string) (trace.Span, context.Context)
StartVMLifecycleSpan creates a span for a VM lifecycle event.
func StartVMRemoveSpan ¶
StartVMRemoveSpan creates a span for removing a VM.
func StartVMStartSpan ¶
StartVMStartSpan creates a span for starting a VM.
func StartVMStopSpan ¶
StartVMStopSpan creates a span for stopping a VM.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider wraps an OpenTelemetry TracerProvider with shutdown capability.
func NewProvider ¶
NewProvider creates an OTLP gRPC TracerProvider that exports to addr. If addr is empty, a no-op provider is returned.