labels

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProfilerName added in v0.20.0

func ProfilerName(name string) labels.Label

func WithProfilerName added in v0.20.0

func WithProfilerName(ls model.LabelSet, name string) model.LabelSet

Types

type Cache added in v0.20.0

type Cache[K comparable, V any] interface {
	Add(key K, value V)
	Get(key K) (V, bool)
	Peek(key K) (V, bool)
	Purge()
}

type Manager

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

Manager is responsible for aggregating, mutating, and serving process labels.

func NewManager

func NewManager(
	logger log.Logger,
	tracer trace.Tracer,
	reg prometheus.Registerer,
	providers []metadata.Provider,
	relabelConfigs []*relabel.Config,
	cacheDisabled bool,
	profilingDuration time.Duration,
) *Manager

New returns an initialized Manager.

func (*Manager) ApplyConfig

func (m *Manager) ApplyConfig(relabelConfigs []*relabel.Config) error

ApplyConfig updates the Manager's config.

func (*Manager) Fetch added in v0.20.0

func (m *Manager) Fetch(ctx context.Context, pid int) error

Fetch fetches process specific labels to the profile. This method is intended to be used by process info manager to fetch certain labels as early as possible. It bypasses relabeling and top-level caching.

func (*Manager) LabelSet

func (m *Manager) LabelSet(ctx context.Context, pid int) (model.LabelSet, error)

LabelSet returns a model.LabelSet with relabel configs applied.

func (*Manager) Labels

func (m *Manager) Labels(ctx context.Context, pid int) (labels.Labels, error)

Labels returns a labels.Labels with relabel configs applied. Returns nil if set is dropped. This method is only used by the UI for troubleshooting.

Jump to

Keyboard shortcuts

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