observability

package
v0.36.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	K8sNamespaceName = "k8s.namespace.name"
)

Variables

This section is empty.

Functions

func K8sAttributes

func K8sAttributes(name, namespace, resource string) []trace.Attribute

K8sAttributes generates Kubernetes trace attributes for the object of the given name in the given namespace. resource identifies the object type as <singular>.<group>

func WithSpanData

func WithSpanData(ctx context.Context, name string, kind int, attributes []trace.Attribute) context.Context

WithSpanData extends the given context with the given span values

Types

type SpanData

type SpanData struct {
	// Name is the span name
	Name string

	// Kind is the span kind
	Kind int

	// Attributes is the additional set of span attributes
	Attributes []trace.Attribute
}

SpanData contains values for creating tracing spans.

func SpanDataFromContext

func SpanDataFromContext(ctx context.Context) *SpanData

SpanDataFromContext gets the span values from the context

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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