instrumentation

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAmazonCloudWatchAgentResource added in v1.2.1

func GetAmazonCloudWatchAgentResource(ctx context.Context, c client.Client, name string) v1alpha1.AmazonCloudWatchAgent

func InjectAnnotationKey added in v1.1.0

func InjectAnnotationKey(instType Type) string

InjectAnnotationKey maps the instrumentation type to the inject annotation.

func NewMutator

func NewMutator(logger logr.Logger, client client.Client, recorder record.EventRecorder) *instPodMutator

Types

type AnnotationMutation added in v1.1.0

type AnnotationMutation interface {
	// Mutate attempts to modify the annotations map. Returns the mutated annotations if any.
	Mutate(annotations map[string]string) map[string]string
}

AnnotationMutation is used to modify an annotation map.

func NewInsertAnnotationMutation added in v1.1.0

func NewInsertAnnotationMutation(annotations map[string]string) AnnotationMutation

NewInsertAnnotationMutation creates a new mutation that inserts annotations. Any missing annotation key is sufficient for it to attempt to insert.

func NewRemoveAnnotationMutation added in v1.1.0

func NewRemoveAnnotationMutation(annotations []string) AnnotationMutation

NewRemoveAnnotationMutation creates a new mutation that removes annotations. All provided annotation keys must be present for it to attempt to remove them.

type AnnotationMutator added in v1.1.0

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

func NewAnnotationMutator added in v1.1.0

func NewAnnotationMutator(mutations []AnnotationMutation) AnnotationMutator

NewAnnotationMutator creates a mutator with the provided mutations that can mutate an Object's annotations.

func (*AnnotationMutator) Mutate added in v1.1.0

func (m *AnnotationMutator) Mutate(obj metav1.Object) map[string]string

Mutate modifies the object's annotations based on the mutator's mutations. Returns all the mutated annotations.

type Type added in v1.1.0

type Type string

Type is an enum for instrumentation types.

const (
	TypeJava   Type = "java"
	TypeNodeJS Type = "nodejs"
	TypePython Type = "python"
	TypeDotNet Type = "dotnet"
	TypeGo     Type = "go"
)

type TypeSet added in v1.1.0

type TypeSet map[Type]any

TypeSet is a map with Type keys.

func NewTypeSet added in v1.1.0

func NewTypeSet(types ...Type) TypeSet

NewTypeSet creates a new set of Type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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