system

package
v0.99.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// TypeStr is type of detector.
	TypeStr = "system"
)

Variables

This section is empty.

Functions

func NewDetector

NewDetector creates a new system metadata detector

Types

type Config added in v0.37.0

type Config struct {
	// The HostnameSources is a priority list of sources from which hostname will be fetched.
	// In case of the error in fetching hostname from source,
	// the next source from the list will be considered.(**default**: `["dns", "os"]`)
	HostnameSources []string `mapstructure:"hostname_sources"`

	ResourceAttributes metadata.ResourceAttributesConfig `mapstructure:"resource_attributes"`
}

Config defines user-specified configurations unique to the system detector

func CreateDefaultConfig added in v0.81.0

func CreateDefaultConfig() Config

func (*Config) Validate added in v0.37.0

func (cfg *Config) Validate() error

Validate config

type Detector

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

Detector is a system metadata detector

func (*Detector) Detect

func (d *Detector) Detect(ctx context.Context) (resource pcommon.Resource, schemaURL string, err error)

Detect detects system metadata and returns a resource with the available ones

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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