trace

package
v0.0.0-...-1332632 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2025 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

package trace provides a wrapper around third party tracing libraries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetTraceFunction

func SetTraceFunction(f func(context.Context, string) (context.Context, Span))

SetTraceFunction sets StartSpan to call the given function to start a trace span.

Types

type Span

type Span interface {
	End()
}

Span is an interface for a type that ends a span.

func StartSpan

func StartSpan(ctx context.Context, name string) (context.Context, Span)

If SetTraceFunction has been called, StartSpan uses its given function to start a span. Otherwise it does nothing.

Jump to

Keyboard shortcuts

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