opentelemetry

package
v0.19.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithSpan

func ContextWithSpan(parent context.Context, span ptrace.Span) context.Context

ContextWithSpan returns a copy of parent in which span is stored.

func SpanFromContext

func SpanFromContext(ctx context.Context) ptrace.Span

SpanFromContext returns the Span within ctx if one exists.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller handles OpenTelemetry telemetry generation for events.

func NewController

func NewController(logger *slog.Logger, tracerProvider trace.TracerProvider) (*Controller, error)

NewController returns a new initialized Controller.

func (*Controller) Shutdown

func (c *Controller) Shutdown(ctx context.Context) error

Shutdown shuts down the OpenTelemetry TracerProvider.

Once shut down, calls to Trace will result in no-op spans (i.e. dropped).

func (*Controller) Trace

func (c *Controller) Trace(ss ptrace.ScopeSpans)

Trace creates a trace span for event.

This method is safe to call concurrently.

type EBPFSourceIDGenerator

type EBPFSourceIDGenerator struct{}

func NewEBPFSourceIDGenerator

func NewEBPFSourceIDGenerator() *EBPFSourceIDGenerator

func (*EBPFSourceIDGenerator) NewIDs

func (*EBPFSourceIDGenerator) NewSpanID

func (e *EBPFSourceIDGenerator) NewSpanID(ctx context.Context, traceID trace.TraceID) trace.SpanID

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL