tracing

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogErrorWithTrace

func LogErrorWithTrace(span trace.Span, logger *log.Entry, msg string, keyValues ...KeyValueForLog)

LogErrorWithTrace logs an error message modifies the passed in trace span. It sets the status of the span to an error, records the error, and logs the error message using the provided logger.

func LogSuccessWithTrace

func LogSuccessWithTrace(span trace.Span, logger *log.Entry, msg string, keyValues ...KeyValueForLog)

LogSuccessWithTrace logs a success message with the passed in logger and sets the passed-in span's status to OK

func NewOTLPHTTPTraceProvider added in v0.16.0

func NewOTLPHTTPTraceProvider(ctx context.Context, endpointURL, deploymentEnvironmentKey string) (*sdktrace.TracerProvider, func(context.Context), error)

NewOTLPTraceProvider returns a new instance of sdktrace.TracerProvider configured with an OTLP trace HTTP exporter, along with its shutdown function. The provided URL is used as the collector endpoint for sending traces.

Types

type KeyValueForLog

type KeyValueForLog struct {
	Key   string
	Value string
}

KeyValueForLog is a struct that holds a key and value for logging purposes

Jump to

Keyboard shortcuts

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