metadata

package
v0.103.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResourceAttributeConfig

type ResourceAttributeConfig struct {
	Enabled bool `mapstructure:"enabled"`
	// contains filtered or unexported fields
}

ResourceAttributeConfig provides common config for a particular resource attribute.

func (*ResourceAttributeConfig) Unmarshal

func (rac *ResourceAttributeConfig) Unmarshal(parser *confmap.Conf) error

type ResourceAttributesConfig

type ResourceAttributesConfig struct {
	CloudAccountID        ResourceAttributeConfig `mapstructure:"cloud.account.id"`
	CloudAvailabilityZone ResourceAttributeConfig `mapstructure:"cloud.availability_zone"`
	CloudPlatform         ResourceAttributeConfig `mapstructure:"cloud.platform"`
	CloudProvider         ResourceAttributeConfig `mapstructure:"cloud.provider"`
	CloudRegion           ResourceAttributeConfig `mapstructure:"cloud.region"`
	HostID                ResourceAttributeConfig `mapstructure:"host.id"`
	HostImageID           ResourceAttributeConfig `mapstructure:"host.image.id"`
	HostName              ResourceAttributeConfig `mapstructure:"host.name"`
	HostType              ResourceAttributeConfig `mapstructure:"host.type"`
}

ResourceAttributesConfig provides config for resourcedetectionprocessor/ec2 resource attributes.

func DefaultResourceAttributesConfig

func DefaultResourceAttributesConfig() ResourceAttributesConfig

type ResourceBuilder

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

ResourceBuilder is a helper struct to build resources predefined in metadata.yaml. The ResourceBuilder is not thread-safe and must not to be used in multiple goroutines.

func NewResourceBuilder

func NewResourceBuilder(rac ResourceAttributesConfig) *ResourceBuilder

NewResourceBuilder creates a new ResourceBuilder. This method should be called on the start of the application.

func (*ResourceBuilder) Emit

func (rb *ResourceBuilder) Emit() pcommon.Resource

Emit returns the built resource and resets the internal builder state.

func (*ResourceBuilder) SetCloudAccountID

func (rb *ResourceBuilder) SetCloudAccountID(val string)

SetCloudAccountID sets provided value as "cloud.account.id" attribute.

func (*ResourceBuilder) SetCloudAvailabilityZone

func (rb *ResourceBuilder) SetCloudAvailabilityZone(val string)

SetCloudAvailabilityZone sets provided value as "cloud.availability_zone" attribute.

func (*ResourceBuilder) SetCloudPlatform

func (rb *ResourceBuilder) SetCloudPlatform(val string)

SetCloudPlatform sets provided value as "cloud.platform" attribute.

func (*ResourceBuilder) SetCloudProvider

func (rb *ResourceBuilder) SetCloudProvider(val string)

SetCloudProvider sets provided value as "cloud.provider" attribute.

func (*ResourceBuilder) SetCloudRegion

func (rb *ResourceBuilder) SetCloudRegion(val string)

SetCloudRegion sets provided value as "cloud.region" attribute.

func (*ResourceBuilder) SetHostID

func (rb *ResourceBuilder) SetHostID(val string)

SetHostID sets provided value as "host.id" attribute.

func (*ResourceBuilder) SetHostImageID

func (rb *ResourceBuilder) SetHostImageID(val string)

SetHostImageID sets provided value as "host.image.id" attribute.

func (*ResourceBuilder) SetHostName

func (rb *ResourceBuilder) SetHostName(val string)

SetHostName sets provided value as "host.name" attribute.

func (*ResourceBuilder) SetHostType

func (rb *ResourceBuilder) SetHostType(val string)

SetHostType sets provided value as "host.type" attribute.

Jump to

Keyboard shortcuts

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