observability

package
v1.48.2 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

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 (
	// TracingService is the name of the kiali tracer service.
	TracingService = "kiali"
)

Variables

This section is empty.

Functions

func Attribute

func Attribute(key string, val interface{}) attribute.KeyValue

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.

func StopTracer

func StopTracer(provider *sdktrace.TracerProvider)

Stop shutdown the provider.

func TracerName

func TracerName() string

TracerName is the name of the global kiali Trace.

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.

Jump to

Keyboard shortcuts

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