resourceprocessor

package module
v0.116.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 12 Imported by: 25

README

Resource Processor

Status
Stability beta: traces, metrics, logs
Distributions core, contrib, k8s
Issues Open issues Closed issues
Code Owners @dmitryax

The resource processor can be used to apply changes on resource attributes. Please refer to config.go for the config spec.

attributes represents actions that can be applied on resource attributes. See Attributes Processor for more details on supported attributes actions.

Examples:

processors:
  resource:
    attributes:
    - key: cloud.availability_zone
      value: "zone-1"
      action: upsert
    - key: k8s.cluster.name
      from_attribute: k8s-cluster
      action: insert
    - key: redundant-attribute
      action: delete

Refer to config.yaml for detailed examples on using the processor.

Documentation

Overview

Package resourceprocessor implements a processor for applying changes on resource attributes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() processor.Factory

NewFactory returns a new factory for the Resource processor.

Types

type Config

type Config struct {
	// AttributesActions specifies the list of actions to be applied on resource attributes.
	// The set of actions are {INSERT, UPDATE, UPSERT, DELETE, HASH, EXTRACT}.
	AttributesActions []attraction.ActionKeyValue `mapstructure:"attributes"`
}

Config defines configuration for Resource processor.

func (*Config) Validate

func (cfg *Config) Validate() error

Validate checks if the processor configuration is valid

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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