telemetry

package
v0.0.0-...-97f09c1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 21 Imported by: 4

Documentation

Index

Constants

View Source
const DebugID = "debug_id"

Variables

View Source
var OTELTracingPrint = os.Getenv("OTEL_TRACING_PRINT") != "false"

Functions

func GetContextFromRemote

func GetContextFromRemote(ctx context.Context, tracer trace.Tracer, name, spanID, traceID string) (context.Context, trace.Span)

func InitOTLPExporter

func InitOTLPExporter(serviceName, serviceVersion string) func()

InitOTLPExporter initializes an OTLP exporter, and configures the corresponding trace providers.

func NewEventWriter

func NewEventWriter(ctx context.Context, name string) io.Writer

func ReportCriticalError

func ReportCriticalError(ctx context.Context, err error, attrs ...attribute.KeyValue)

func ReportError

func ReportError(ctx context.Context, err error, attrs ...attribute.KeyValue)

func ReportEvent

func ReportEvent(ctx context.Context, name string, attrs ...attribute.KeyValue)

func SetAttributes

func SetAttributes(ctx context.Context, attrs ...attribute.KeyValue)

Types

type EventWriter

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

func (*EventWriter) Write

func (w *EventWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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