trace

package
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: Apache-2.0 Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package trace provides APM tracing helpers for controllers.

Index

Constants

View Source
const TagAgentComponent = "agent.component"

TagAgentComponent is the span tag for the Agent component being reconciled.

Variables

This section is empty.

Functions

func Enabled

func Enabled() bool

Enabled reports whether controller spans are enabled.

func FinishSpan

func FinishSpan(span *tracer.Span, errp *error)

FinishSpan finishes span, recording *errp as the span error.

func SetEnabled

func SetEnabled(v bool)

SetEnabled toggles controller spans without starting the tracer.

func Start

func Start(opts ...tracer.StartOption) error

Start starts the global Datadog tracer and enables controller spans.

func StartReconcileSpan

func StartReconcileSpan(ctx context.Context, kind, operationName string, obj metav1.Object) (*tracer.Span, context.Context)

StartReconcileSpan starts the root span of a reconcile.

func StartSpan

func StartSpan(ctx context.Context, extraTags ...tracer.StartSpanOption) (*tracer.Span, context.Context)

StartSpan starts a span whose resource name is the calling function, and tags the context logger with its IDs.

func Stop

func Stop()

Stop flushes and stops the global Datadog tracer.

func Tag

func Tag(key string, value any) tracer.StartSpanOption

Tag returns a span option that sets a tag, so callers don't need to import the tracer package.

func WrapTransport

func WrapTransport(rt http.RoundTripper) http.RoundTripper

WrapTransport traces Kubernetes API requests made within an active span.

Types

This section is empty.

Jump to

Keyboard shortcuts

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