Documentation ¶
Index ¶
- func NewMetricsRequest(ctx context.Context, endpoint string, metrics ...ResourceMetrics) (*http.Request, error)
- func ProcessMetricResponse(resp *http.Response) (dropped int64, errs error)
- func WithDelimitedStrings[Tags ~[]string](delim string, tags Tags) func(m Map)
- func WithHistogramDataPointAttributes(attrs Map) func(HistogramDataPoint)
- func WithHistogramDataPointBucketValues[Buckets ~map[float64]uint64](buckets Buckets) func(HistogramDataPoint)
- func WithHistogramDataPointStatistics(values []float64) func(HistogramDataPoint)
- func WithInstrumentationScopeAttributes(attributes Map) func(InstrumentationScope)
- func WithNumberDataPointDelimtedTags[Tags ~[]string](tags Tags) func(NumberDataPoint)
- func WithNumberDataPointDoubleValue(value float64) func(NumberDataPoint)
- func WithNumberDatapointIntValue(value int64) func(NumberDataPoint)
- func WithResourceAttributes(opts ...func(Map)) func(Resource)
- func WithStatsdDelimitedTags[Tags ~[]string](tags Tags) func(Map)
- type Gauge
- type Histogram
- type HistogramDataPoint
- type InstrumentationScope
- type Map
- type Metric
- type NumberDataPoint
- type Resource
- type ResourceMetrics
- type ScopeMetrics
- type Sum
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMetricsRequest ¶
func ProcessMetricResponse ¶
func WithDelimitedStrings ¶
WithDelimtedStrings splits each value based on the delim passed, if there is no delim present, then the entire string is added to the key and uses an empty string as the value
func WithHistogramDataPointAttributes ¶
func WithHistogramDataPointAttributes(attrs Map) func(HistogramDataPoint)
func WithHistogramDataPointBucketValues ¶
func WithHistogramDataPointBucketValues[Buckets ~map[float64]uint64](buckets Buckets) func(HistogramDataPoint)
func WithHistogramDataPointStatistics ¶
func WithHistogramDataPointStatistics(values []float64) func(HistogramDataPoint)
func WithInstrumentationScopeAttributes ¶
func WithInstrumentationScopeAttributes(attributes Map) func(InstrumentationScope)
func WithNumberDataPointDelimtedTags ¶
func WithNumberDataPointDelimtedTags[Tags ~[]string](tags Tags) func(NumberDataPoint)
func WithNumberDataPointDoubleValue ¶
func WithNumberDataPointDoubleValue(value float64) func(NumberDataPoint)
func WithNumberDatapointIntValue ¶
func WithNumberDatapointIntValue(value int64) func(NumberDataPoint)
func WithResourceAttributes ¶
func WithStatsdDelimitedTags ¶
Types ¶
type Gauge ¶
type Gauge struct {
// contains filtered or unexported fields
}
func NewGauge ¶
func NewGauge(datapoints ...NumberDataPoint) Gauge
type Histogram ¶
type Histogram struct {
// contains filtered or unexported fields
}
func NewHistogram ¶
func NewHistogram(datapoints ...HistogramDataPoint) Histogram
type HistogramDataPoint ¶
type HistogramDataPoint struct {
// contains filtered or unexported fields
}
func NewHistogramDataPoint ¶
func NewHistogramDataPoint(timestamp uint64, opts ...func(HistogramDataPoint)) HistogramDataPoint
type InstrumentationScope ¶
type InstrumentationScope struct {
// contains filtered or unexported fields
}
func NewInstrumentationScope ¶
func NewInstrumentationScope(name string, version string, opts ...func(InstrumentationScope)) InstrumentationScope
NewInstrumentationScope is used for denote how the data was generated, this will always be set to `gostatsd` as the name, and the deployed version. Additional attributes can be set that could be used for filtering later on.
func (InstrumentationScope) Attributes ¶
func (is InstrumentationScope) Attributes() Map
type Metric ¶
type Metric struct {
// contains filtered or unexported fields
}
func NewMetric ¶
NewMetric creates a new metric wrapper and sets the metric value based on the provided function.
func (Metric) SetHistogram ¶
type NumberDataPoint ¶
type NumberDataPoint struct {
// contains filtered or unexported fields
}
func NewNumberDataPoint ¶
func NewNumberDataPoint(timestamp uint64, opts ...func(NumberDataPoint)) NumberDataPoint
NewNumberDataPoint applies options in order so the last value set wins
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
func NewResource ¶
func (Resource) Attributes ¶
type ResourceMetrics ¶
type ResourceMetrics struct {
// contains filtered or unexported fields
}
func NewResourceMetrics ¶
func NewResourceMetrics(resource Resource, scopeMetrics ...ScopeMetrics) ResourceMetrics
type ScopeMetrics ¶
type ScopeMetrics struct {
// contains filtered or unexported fields
}
func NewScopeMetrics ¶
func NewScopeMetrics(is InstrumentationScope, metrics ...Metric) ScopeMetrics
Click to show internal directories.
Click to hide internal directories.