tracing

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JaegerTraceProvider

func JaegerTraceProvider(url, deploymentEnvironmentKey string) (*sdktrace.TracerProvider, func(context.Context), error)

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

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

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