Documentation ¶
Index ¶
Constants ¶
View Source
const ( ConversionAsGauge = "AsGauge" ConversionAsHistogram = "AsHistogram" )
Variables ¶
This section is empty.
Functions ¶
func NewClientFromViper ¶
func NewClientFromViper(v *viper.Viper, logger logrus.FieldLogger, pool *transport.TransportPool) (gostatsd.Backend, error)
Types ¶
type Client ¶
type Client struct{}
Client contains additional meta data in order to export values as OTLP metrics. The zero value is not safe to use.
func (Client) SendMetricsAsync ¶
type Config ¶
type Config struct { // Endpoint (Required) is the FQDN with path for the metrics ingestion endpoint Endpoint string `mapstructure:"endpoint"` // MaxRequests (Optional, default: cpu.count * 2) is the upper limit on the number of inflight requests MaxRequests int `mapstructure:"max_requests"` // ResourceKeys (Optional) is used to extract values from provided tags // to apply to all values within a resource instead within each attribute. // Strongly encouraged to allow down stream consumers to // process based on values defined at the top level resource. ResourceKeys []string `mapstructure:"resource_keys"` // TimerConversion (Optional, Default: AsGauge) determines if a timers are emitted as one of the following: // - AsGauges emits each calcauted value (min, max, sum, count, upper, upper_99, etc...) as a guage value // - AsHistograms each timer is set as an empty bucket histogram with only Min, Max, Sum, and Count set TimerConversion string `mapstructure:"timer_conversion"` // HistogramConversion (Optional, Default: AsGauge) determines how a GoStatsD histogram should be converted into OTLP. // The allowed values for this are: // - AsGauges: sends each bucket count (including +inf) as a guage value and the bucket boundry as a tag // - AsHistogram: sends each histogram as a single Histogram value with bucket and statistics calculated. HistogramConversion string `mapstructure:"histogram_conversion"` // Transport (Optional, Default: "default") is used to reference to configured transport // to be used for this backend Transport string `mapstructure:"transport"` // UserAgent (Optional, default: "gostatsd") allows you to set the // user agent header when making requests. UserAgent string `mapstructure:"user_agent"` }
Click to show internal directories.
Click to hide internal directories.