Documentation
¶
Index ¶
- func LogErrorWithTrace(span trace.Span, logger *log.Entry, msg string, keyValues ...KeyValueForLog)
- func LogSuccessWithTrace(span trace.Span, logger *log.Entry, msg string, keyValues ...KeyValueForLog)
- func NewOTLPHTTPTraceProvider(ctx context.Context, endpointURL, deploymentEnvironmentKey string) (*sdktrace.TracerProvider, func(context.Context), error)
- type KeyValueForLog
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogErrorWithTrace ¶
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 ¶
KeyValueForLog is a struct that holds a key and value for logging purposes
Click to show internal directories.
Click to hide internal directories.