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 ¶
View Source
const ( HTTP = "http" HTTPS = "https" GRPC = "grpc" )
View Source
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(collectorURL string) *sdktrace.TracerProvider
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.
Click to show internal directories.
Click to hide internal directories.