Documentation ¶
Overview ¶
The observability package provides utilities for the Kiali server to instrument itself with observability tools such as tracing to provide better insights into server performance.
Index ¶
Constants ¶
const (
// TracingService is the name of the kiali tracer service.
TracingService = "kiali"
)
Variables ¶
This section is empty.
Functions ¶
func Attribute ¶
Attribute transforms any k/v into an attribute.KeyValue. val types that are not recognized return an empty Value.
func InitTracer ¶
func InitTracer(jaegerURL string) *sdktrace.TracerProvider
InitTracer initalizes a TracerProvider that exports to jaeger. This will panic if there's an error in setup.
Types ¶
type EndFunc ¶
type EndFunc func()
EndFunc ends a span if one is started. Otherwise does nothing.
func StartSpan ¶
func StartSpan(ctx context.Context, funcName string, attrs ...attribute.KeyValue) (context.Context, EndFunc)
StartSpan creates and starts a span from the given context. It returns a new context with the span added and a func to be called when the span ends. If tracing is not enabled, this function does nothing. The return func is safe to call even when tracing is not enabled.