instrumentation

package
v0.0.0-...-4d4388a Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImmutableWorkloadError

type ImmutableWorkloadError struct {
	// contains filtered or unexported fields
}

func (ImmutableWorkloadError) Error

func (e ImmutableWorkloadError) Error() string

type Instrumenter

type Instrumenter struct {
	client.Client
	Clientset                    *kubernetes.Clientset
	Recorder                     events.EventRecorder
	ClusterInstrumentationConfig *util.ClusterInstrumentationConfig
}

func NewInstrumenter

func NewInstrumenter(
	client client.Client,
	clientset *kubernetes.Clientset,
	recorder events.EventRecorder,
	clusterInstrumentationConfig *util.ClusterInstrumentationConfig,
) *Instrumenter

func (*Instrumenter) CheckSettingsAndInstrumentExistingWorkloads

func (i *Instrumenter) CheckSettingsAndInstrumentExistingWorkloads(
	ctx context.Context,
	dash0MonitoringResource *dash0v1beta1.Dash0Monitoring,
	logger logd.Logger,
) error

CheckSettingsAndInstrumentExistingWorkloads is the main instrumentation function that is called in the controller's reconcile loop. It checks the settings of the Dash0 monitoring resource and instruments existing workloads accodingly.

func (*Instrumenter) DelayAfterEachNamespaceMillis

func (i *Instrumenter) DelayAfterEachNamespaceMillis() time.Duration

func (*Instrumenter) DelayAfterEachWorkloadMillis

func (i *Instrumenter) DelayAfterEachWorkloadMillis() time.Duration

func (*Instrumenter) InstrumentAtStartup

func (i *Instrumenter) InstrumentAtStartup(
	ctx context.Context,
	logger logd.Logger,
)

InstrumentAtStartup is run once, when the operator manager process starts. Its main purpose is to upgrade workloads that have already been instrumented, in namespaces where the Dash0 monitoring resource already exists. For those workloads, it is not guaranteed that a reconcile request will be triggered when the operator controller image is updated and restarted - reconcile requests are only triggered when the Dash0 monitoring resource is installed/changed/deleted. Since it runs the full instrumentation process, it might also as a byproduct instrument workloads that are not instrumented yet. It will only cover namespaces where a Dash0 monitoring resource exists, because it works by listing all Dash0 monitoring resources and then instrumenting workloads in the corresponding namespaces.

func (*Instrumenter) UninstrumentWorkloadsIfAvailable

func (i *Instrumenter) UninstrumentWorkloadsIfAvailable(
	ctx context.Context,
	dash0MonitoringResource *dash0v1beta1.Dash0Monitoring,
	logger logd.Logger,
) error

UninstrumentWorkloadsIfAvailable is the main uninstrumentation function that is called in the controller's reconcile loop. It checks whether the Dash0 monitoring resource is marked as available; if it is, it uninstruments existing workloads.

func (*Instrumenter) UpdateExtraConfig

func (i *Instrumenter) UpdateExtraConfig(_ context.Context, extraConfig util.ExtraConfig, _ logd.Logger)

Jump to

Keyboard shortcuts

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