Documentation
¶
Index ¶
- func NewLogger(debug bool) *slog.Logger
- func NewTestLogger(debug bool) *slog.Logger
- func Propagator() propagation.TextMapPropagator
- func StartTestTracing(ctx context.Context, integration bool, tpAddr string) (func(context.Context) error, error)
- func StartTracing(ctx context.Context, tpAddr string) (func(context.Context) error, error)
- func TraceID(span trace.Span) string
- func TraceIDFromCtx(ctx context.Context) string
- func Tracer(name string) otrace.Tracer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTestLogger ¶
func Propagator ¶
func Propagator() propagation.TextMapPropagator
Propagator returns a TextMapPropagator.
func StartTestTracing ¶
func StartTestTracing(ctx context.Context, integration bool, tpAddr string) (func(context.Context) error, error)
StartTestTracing returns a noop trace provider for testing and tpAddr is not considered. If integration is set to true, tpAddr is forwarded to StartTracing.
func StartTracing ¶
StartTracing bootstraps OpenTelemetry by setting a propagator and a trace provider with the given trace provider addr. Use the returned shutdown func to gracefully shutdown OpenTelemetry in case of no error.
func TraceIDFromCtx ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.