Documentation ¶
Index ¶
- func CreateDefaultConfig() config.Receiver
- func GetSettableStructFieldValue(strukt any, fieldName string, fieldType reflect.Type) (*reflect.Value, error)
- func NewFactory() component.ReceiverFactory
- func SetStructFieldIfZeroValue(strukt any, fieldName string, value any) (bool, error)
- func SetStructFieldWithExplicitType(strukt any, fieldName string, value any, fieldTypes ...reflect.Type) (bool, error)
- type Config
- type Output
- func (output *Output) AddDatapointExclusionFilter(filter dpfilters.DatapointFilter)
- func (output *Output) AddDefaultSpanTag(key, value string)
- func (output *Output) AddExtraDimension(key, value string)
- func (output *Output) AddExtraSpanTag(key, value string)
- func (output *Output) Copy() types.Output
- func (output *Output) EnabledMetrics() []string
- func (output *Output) HasAnyExtraMetrics() bool
- func (output *Output) HasEnabledMetricInGroup(group string) bool
- func (output *Output) RemoveDefaultSpanTag(key string)
- func (output *Output) RemoveExtraDimension(key string)
- func (output *Output) RemoveExtraSpanTag(key string)
- func (output *Output) SendDatapoints(datapoints ...*datapoint.Datapoint)
- func (output *Output) SendDimensionUpdate(dimension *types.Dimension)
- func (output *Output) SendEvent(event *event.Event)
- func (output *Output) SendSpans(spans ...*trace.Span)
- type Receiver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDefaultConfig ¶
func GetSettableStructFieldValue ¶ added in v0.20.0
func GetSettableStructFieldValue(strukt any, fieldName string, fieldType reflect.Type) (*reflect.Value, error)
GetSettableStructFieldValue finds the first occurrence of a valid, settable field value from a potentially embedded struct with a fieldName of desired type. Based on https://github.com/signalfx/signalfx-agent/blob/731c2a0b5ff5ac324130453b02dd9cb7c912c0d5/pkg/utils/reflection.go#L36
func NewFactory ¶
func NewFactory() component.ReceiverFactory
func SetStructFieldIfZeroValue ¶ added in v0.20.0
SetStructFieldIfZeroValue same as SetStructField() but only if first occurrence of the field is of zero value.
func SetStructFieldWithExplicitType ¶ added in v0.20.0
func SetStructFieldWithExplicitType(strukt any, fieldName string, value any, fieldTypes ...reflect.Type) (bool, error)
SetStructFieldWithExplicitType sets the first occurrence of a (potentially embedded) struct field w/ name fieldName and first occurring fieldType to desired value, if available. Returns true if successfully set, false otherwise. Error contains if field undetected or if issues occur with reflect usage.
Types ¶
type Config ¶
type Config struct { config.ReceiverSettings `mapstructure:",squash"` // Generally an observer/receivercreator-set value via Endpoint.Target. // Will expand to MonitorCustomConfig Host and Port values if unset. Endpoint string `mapstructure:"endpoint"` DimensionClients []string `mapstructure:"dimensionClients"` // contains filtered or unexported fields }
type Output ¶
type Output struct {
// contains filtered or unexported fields
}
Output is an implementation of a Smart Agent FilteringOutput that receives datapoints, events, and dimension updates from a configured monitor. It will forward all datapoints to the nextMetricsConsumer, all dimension updates to the nextDimensionClients as determined by the associated items in Config.MetadataClients, and all events to the nextLogsConsumer.
func (*Output) AddDatapointExclusionFilter ¶
func (output *Output) AddDatapointExclusionFilter(filter dpfilters.DatapointFilter)
func (*Output) AddDefaultSpanTag ¶
func (*Output) AddExtraDimension ¶
func (*Output) AddExtraSpanTag ¶
func (*Output) Copy ¶
Copy clones the Output to provide to child monitors with their own extraDimensions.
func (*Output) EnabledMetrics ¶
func (*Output) HasAnyExtraMetrics ¶
func (*Output) HasEnabledMetricInGroup ¶
func (*Output) RemoveDefaultSpanTag ¶
func (*Output) RemoveExtraDimension ¶
func (*Output) RemoveExtraSpanTag ¶
func (*Output) SendDatapoints ¶
func (*Output) SendDimensionUpdate ¶
type Receiver ¶
func NewReceiver ¶
func NewReceiver(params component.ReceiverCreateSettings, config Config) *Receiver