Documentation ¶
Index ¶
- type ResourceAttributeConfig
- type ResourceAttributesConfig
- type ResourceBuilder
- func (rb *ResourceBuilder) Emit() pcommon.Resource
- func (rb *ResourceBuilder) SetHostArch(val string)
- func (rb *ResourceBuilder) SetHostCPUCacheL2Size(val int64)
- func (rb *ResourceBuilder) SetHostCPUFamily(val string)
- func (rb *ResourceBuilder) SetHostCPUModelID(val string)
- func (rb *ResourceBuilder) SetHostCPUModelName(val string)
- func (rb *ResourceBuilder) SetHostCPUStepping(val string)
- func (rb *ResourceBuilder) SetHostCPUVendorID(val string)
- func (rb *ResourceBuilder) SetHostID(val string)
- func (rb *ResourceBuilder) SetHostIP(val []any)
- func (rb *ResourceBuilder) SetHostMac(val []any)
- func (rb *ResourceBuilder) SetHostName(val string)
- func (rb *ResourceBuilder) SetOsDescription(val string)
- func (rb *ResourceBuilder) SetOsType(val string)
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.
type ResourceAttributesConfig ¶
type ResourceAttributesConfig struct { HostArch ResourceAttributeConfig `mapstructure:"host.arch"` HostCPUCacheL2Size ResourceAttributeConfig `mapstructure:"host.cpu.cache.l2.size"` HostCPUFamily ResourceAttributeConfig `mapstructure:"host.cpu.family"` HostCPUModelID ResourceAttributeConfig `mapstructure:"host.cpu.model.id"` HostCPUModelName ResourceAttributeConfig `mapstructure:"host.cpu.model.name"` HostCPUStepping ResourceAttributeConfig `mapstructure:"host.cpu.stepping"` HostCPUVendorID ResourceAttributeConfig `mapstructure:"host.cpu.vendor.id"` HostID ResourceAttributeConfig `mapstructure:"host.id"` HostIP ResourceAttributeConfig `mapstructure:"host.ip"` HostMac ResourceAttributeConfig `mapstructure:"host.mac"` HostName ResourceAttributeConfig `mapstructure:"host.name"` OsDescription ResourceAttributeConfig `mapstructure:"os.description"` OsType ResourceAttributeConfig `mapstructure:"os.type"` }
ResourceAttributesConfig provides config for resourcedetectionprocessor/system resource attributes.
func DefaultResourceAttributesConfig ¶
func DefaultResourceAttributesConfig() ResourceAttributesConfig
type ResourceBuilder ¶ added in v0.82.0
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 ¶ added in v0.82.0
func NewResourceBuilder(rac ResourceAttributesConfig) *ResourceBuilder
NewResourceBuilder creates a new ResourceBuilder. This method should be called on the start of the application.
func (*ResourceBuilder) Emit ¶ added in v0.82.0
func (rb *ResourceBuilder) Emit() pcommon.Resource
Emit returns the built resource and resets the internal builder state.
func (*ResourceBuilder) SetHostArch ¶ added in v0.82.0
func (rb *ResourceBuilder) SetHostArch(val string)
SetHostArch sets provided value as "host.arch" attribute.
func (*ResourceBuilder) SetHostCPUCacheL2Size ¶ added in v0.86.0
func (rb *ResourceBuilder) SetHostCPUCacheL2Size(val int64)
SetHostCPUCacheL2Size sets provided value as "host.cpu.cache.l2.size" attribute.
func (*ResourceBuilder) SetHostCPUFamily ¶ added in v0.86.0
func (rb *ResourceBuilder) SetHostCPUFamily(val string)
SetHostCPUFamily sets provided value as "host.cpu.family" attribute.
func (*ResourceBuilder) SetHostCPUModelID ¶ added in v0.86.0
func (rb *ResourceBuilder) SetHostCPUModelID(val string)
SetHostCPUModelID sets provided value as "host.cpu.model.id" attribute.
func (*ResourceBuilder) SetHostCPUModelName ¶ added in v0.86.0
func (rb *ResourceBuilder) SetHostCPUModelName(val string)
SetHostCPUModelName sets provided value as "host.cpu.model.name" attribute.
func (*ResourceBuilder) SetHostCPUStepping ¶ added in v0.86.0
func (rb *ResourceBuilder) SetHostCPUStepping(val string)
SetHostCPUStepping sets provided value as "host.cpu.stepping" attribute.
func (*ResourceBuilder) SetHostCPUVendorID ¶ added in v0.86.0
func (rb *ResourceBuilder) SetHostCPUVendorID(val string)
SetHostCPUVendorID sets provided value as "host.cpu.vendor.id" attribute.
func (*ResourceBuilder) SetHostID ¶ added in v0.82.0
func (rb *ResourceBuilder) SetHostID(val string)
SetHostID sets provided value as "host.id" attribute.
func (*ResourceBuilder) SetHostIP ¶ added in v0.91.0
func (rb *ResourceBuilder) SetHostIP(val []any)
SetHostIP sets provided value as "host.ip" attribute.
func (*ResourceBuilder) SetHostMac ¶ added in v0.91.0
func (rb *ResourceBuilder) SetHostMac(val []any)
SetHostMac sets provided value as "host.mac" attribute.
func (*ResourceBuilder) SetHostName ¶ added in v0.82.0
func (rb *ResourceBuilder) SetHostName(val string)
SetHostName sets provided value as "host.name" attribute.
func (*ResourceBuilder) SetOsDescription ¶ added in v0.83.0
func (rb *ResourceBuilder) SetOsDescription(val string)
SetOsDescription sets provided value as "os.description" attribute.
func (*ResourceBuilder) SetOsType ¶ added in v0.82.0
func (rb *ResourceBuilder) SetOsType(val string)
SetOsType sets provided value as "os.type" attribute.