Documentation ¶
Index ¶
- type ResourceAttributeConfig
- type ResourceAttributesConfig
- type ResourceBuilder
- func (rb *ResourceBuilder) Emit() pcommon.Resource
- func (rb *ResourceBuilder) SetCloudAccountID(val string)
- func (rb *ResourceBuilder) SetCloudAvailabilityZone(val string)
- func (rb *ResourceBuilder) SetCloudPlatform(val string)
- func (rb *ResourceBuilder) SetCloudProvider(val string)
- func (rb *ResourceBuilder) SetCloudRegion(val string)
- func (rb *ResourceBuilder) SetFaasID(val string)
- func (rb *ResourceBuilder) SetFaasInstance(val string)
- func (rb *ResourceBuilder) SetFaasName(val string)
- func (rb *ResourceBuilder) SetFaasVersion(val string)
- func (rb *ResourceBuilder) SetFromCallable(set func(string), detect func() (string, error)) error
- func (rb *ResourceBuilder) SetGcpCloudRunJobExecution(val string)
- func (rb *ResourceBuilder) SetGcpCloudRunJobTaskIndex(val string)
- func (rb *ResourceBuilder) SetGcpGceInstanceHostname(val string)
- func (rb *ResourceBuilder) SetGcpGceInstanceName(val string)
- func (rb *ResourceBuilder) SetHostID(val string)
- func (rb *ResourceBuilder) SetHostName(val string)
- func (rb *ResourceBuilder) SetHostType(val string)
- func (rb *ResourceBuilder) SetK8sClusterName(val string)
- func (rb *ResourceBuilder) SetZoneAndRegion(detect func() (string, string, error)) error
- func (rb *ResourceBuilder) SetZoneOrRegion(detect func() (string, gcp.LocationType, error)) error
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 { 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"` FaasID ResourceAttributeConfig `mapstructure:"faas.id"` FaasInstance ResourceAttributeConfig `mapstructure:"faas.instance"` FaasName ResourceAttributeConfig `mapstructure:"faas.name"` FaasVersion ResourceAttributeConfig `mapstructure:"faas.version"` GcpCloudRunJobExecution ResourceAttributeConfig `mapstructure:"gcp.cloud_run.job.execution"` GcpCloudRunJobTaskIndex ResourceAttributeConfig `mapstructure:"gcp.cloud_run.job.task_index"` GcpGceInstanceHostname ResourceAttributeConfig `mapstructure:"gcp.gce.instance.hostname"` GcpGceInstanceName ResourceAttributeConfig `mapstructure:"gcp.gce.instance.name"` HostID ResourceAttributeConfig `mapstructure:"host.id"` HostName ResourceAttributeConfig `mapstructure:"host.name"` HostType ResourceAttributeConfig `mapstructure:"host.type"` K8sClusterName ResourceAttributeConfig `mapstructure:"k8s.cluster.name"` }
ResourceAttributesConfig provides config for resourcedetectionprocessor/gcp 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) SetCloudAccountID ¶ added in v0.82.0
func (rb *ResourceBuilder) SetCloudAccountID(val string)
SetCloudAccountID sets provided value as "cloud.account.id" attribute.
func (*ResourceBuilder) SetCloudAvailabilityZone ¶ added in v0.82.0
func (rb *ResourceBuilder) SetCloudAvailabilityZone(val string)
SetCloudAvailabilityZone sets provided value as "cloud.availability_zone" attribute.
func (*ResourceBuilder) SetCloudPlatform ¶ added in v0.82.0
func (rb *ResourceBuilder) SetCloudPlatform(val string)
SetCloudPlatform sets provided value as "cloud.platform" attribute.
func (*ResourceBuilder) SetCloudProvider ¶ added in v0.82.0
func (rb *ResourceBuilder) SetCloudProvider(val string)
SetCloudProvider sets provided value as "cloud.provider" attribute.
func (*ResourceBuilder) SetCloudRegion ¶ added in v0.82.0
func (rb *ResourceBuilder) SetCloudRegion(val string)
SetCloudRegion sets provided value as "cloud.region" attribute.
func (*ResourceBuilder) SetFaasID ¶ added in v0.82.0
func (rb *ResourceBuilder) SetFaasID(val string)
SetFaasID sets provided value as "faas.id" attribute.
func (*ResourceBuilder) SetFaasInstance ¶ added in v0.87.0
func (rb *ResourceBuilder) SetFaasInstance(val string)
SetFaasInstance sets provided value as "faas.instance" attribute.
func (*ResourceBuilder) SetFaasName ¶ added in v0.82.0
func (rb *ResourceBuilder) SetFaasName(val string)
SetFaasName sets provided value as "faas.name" attribute.
func (*ResourceBuilder) SetFaasVersion ¶ added in v0.82.0
func (rb *ResourceBuilder) SetFaasVersion(val string)
SetFaasVersion sets provided value as "faas.version" attribute.
func (*ResourceBuilder) SetFromCallable ¶ added in v0.82.0
func (rb *ResourceBuilder) SetFromCallable(set func(string), detect func() (string, error)) error
func (*ResourceBuilder) SetGcpCloudRunJobExecution ¶ added in v0.82.0
func (rb *ResourceBuilder) SetGcpCloudRunJobExecution(val string)
SetGcpCloudRunJobExecution sets provided value as "gcp.cloud_run.job.execution" attribute.
func (*ResourceBuilder) SetGcpCloudRunJobTaskIndex ¶ added in v0.82.0
func (rb *ResourceBuilder) SetGcpCloudRunJobTaskIndex(val string)
SetGcpCloudRunJobTaskIndex sets provided value as "gcp.cloud_run.job.task_index" attribute.
func (*ResourceBuilder) SetGcpGceInstanceHostname ¶ added in v0.83.0
func (rb *ResourceBuilder) SetGcpGceInstanceHostname(val string)
SetGcpGceInstanceHostname sets provided value as "gcp.gce.instance.hostname" attribute.
func (*ResourceBuilder) SetGcpGceInstanceName ¶ added in v0.83.0
func (rb *ResourceBuilder) SetGcpGceInstanceName(val string)
SetGcpGceInstanceName sets provided value as "gcp.gce.instance.name" 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) SetHostName ¶ added in v0.82.0
func (rb *ResourceBuilder) SetHostName(val string)
SetHostName sets provided value as "host.name" attribute.
func (*ResourceBuilder) SetHostType ¶ added in v0.82.0
func (rb *ResourceBuilder) SetHostType(val string)
SetHostType sets provided value as "host.type" attribute.
func (*ResourceBuilder) SetK8sClusterName ¶ added in v0.82.0
func (rb *ResourceBuilder) SetK8sClusterName(val string)
SetK8sClusterName sets provided value as "k8s.cluster.name" attribute.
func (*ResourceBuilder) SetZoneAndRegion ¶ added in v0.82.0
func (rb *ResourceBuilder) SetZoneAndRegion(detect func() (string, string, error)) error
func (*ResourceBuilder) SetZoneOrRegion ¶ added in v0.82.0
func (rb *ResourceBuilder) SetZoneOrRegion(detect func() (string, gcp.LocationType, error)) error