mopentelemetry

package
v1.27.0-beta.17 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleSpanError

func HandleSpanError(span *trace.Span, message string, err error)

func SetSpanAttributesFromStruct

func SetSpanAttributesFromStruct(span *trace.Span, key string, valueStruct any) error

SetSpanAttributesFromStruct converts a struct to a JSON string and sets it as an attribute on the span.

Types

type Telemetry

type Telemetry struct {
	LibraryName               string
	ServiceName               string
	ServiceVersion            string
	DeploymentEnv             string
	CollectorExporterEndpoint string
	TracerProvider            *sdktrace.TracerProvider
	MetricProvider            *sdkmetric.MeterProvider
	LoggerProvider            *sdklog.LoggerProvider
	// contains filtered or unexported fields
}

func (*Telemetry) InitializeTelemetry

func (tl *Telemetry) InitializeTelemetry() *Telemetry

InitializeTelemetry initializes the telemetry providers and sets them globally.

func (*Telemetry) ShutdownTelemetry

func (tl *Telemetry) ShutdownTelemetry()

Jump to

Keyboard shortcuts

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