Documentation
¶
Overview ¶
Package trace provides APM tracing helpers for controllers.
Index ¶
- Constants
- func Enabled() bool
- func FinishSpan(span *tracer.Span, errp *error)
- func SetEnabled(v bool)
- func Start(opts ...tracer.StartOption) error
- func StartReconcileSpan(ctx context.Context, kind, operationName string, obj metav1.Object) (*tracer.Span, context.Context)
- func StartSpan(ctx context.Context, extraTags ...tracer.StartSpanOption) (*tracer.Span, context.Context)
- func Stop()
- func Tag(key string, value any) tracer.StartSpanOption
- func WrapTransport(rt http.RoundTripper) http.RoundTripper
Constants ¶
const TagAgentComponent = "agent.component"
TagAgentComponent is the span tag for the Agent component being reconciled.
Variables ¶
This section is empty.
Functions ¶
func FinishSpan ¶
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 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.