Documentation ¶
Index ¶
Constants ¶
const ( TracesStability = component.StabilityLevelDevelopment MetricsStability = component.StabilityLevelDevelopment LogsStability = component.StabilityLevelDevelopment )
Variables ¶
var (
Type = component.MustNewType("mackerelattributes")
)
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 { MackerelioHostID ResourceAttributeConfig `mapstructure:"mackerelio.host.id"` MackerelioHostURL ResourceAttributeConfig `mapstructure:"mackerelio.host.url"` MackerelioOrgName ResourceAttributeConfig `mapstructure:"mackerelio.org.name"` }
ResourceAttributesConfig provides config for mackerelattributes 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) SetMackerelioHostID ¶
func (rb *ResourceBuilder) SetMackerelioHostID(val string)
SetMackerelioHostID sets provided value as "mackerelio.host.id" attribute.
func (*ResourceBuilder) SetMackerelioHostURL ¶
func (rb *ResourceBuilder) SetMackerelioHostURL(val string)
SetMackerelioHostURL sets provided value as "mackerelio.host.url" attribute.
func (*ResourceBuilder) SetMackerelioOrgName ¶
func (rb *ResourceBuilder) SetMackerelioOrgName(val string)
SetMackerelioOrgName sets provided value as "mackerelio.org.name" attribute.