ingest

package
v0.0.0-...-7fa8e96 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2020 License: Apache-2.0 Imports: 27 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRequestExceedsBurst = errors.New("request exceeds limit burst size")
)
View Source
var MetricPool = util.NewMetricDataPool()

MetricPool is a shared buffer for metrics ingested over http

Functions

func ConfigureRateLimits

func ConfigureRateLimits(limitStr string) error

func InitMtBulkImporter

func InitMtBulkImporter(importerUrlStr string) error

func IsRateBudgetAvailable

func IsRateBudgetAvailable(ctx context.Context, orgId int) bool

func Metrics

func Metrics(ctx *models.Context)

func MtBulkImporter

func MtBulkImporter() func(c *models.Context)

func OpenTSDBWrite

func OpenTSDBWrite(ctx *models.Context)

func PrometheusMTWrite

func PrometheusMTWrite(ctx *models.Context)

func Proxy

func Proxy(orgId int) *httputil.ReverseProxy

func UseRateLimit

func UseRateLimit() bool

Types

type MetricsResponse

type MetricsResponse struct {
	Invalid          int
	Published        int
	ValidationErrors map[string]ValidationError
}

func NewMetricsResponse

func NewMetricsResponse() MetricsResponse

func (*MetricsResponse) AddInvalid

func (m *MetricsResponse) AddInvalid(err error, index int)

AddInvalid updates the counts and makes sure there's up to 10 examples per error

type OpenTSDBMetric

type OpenTSDBMetric struct {
	Metric    string            `json:"metric"`
	Timestamp int64             `json:"timestamp"`
	Value     float64           `json:"value"`
	Tags      map[string]string `json:"tags"`
}

func (OpenTSDBMetric) FormatTags

func (m OpenTSDBMetric) FormatTags(tagArray []string) []string

type OpenTSDBPutRequest

type OpenTSDBPutRequest []OpenTSDBMetric

type ValidationError

type ValidationError struct {
	Count      int
	ExampleIds []int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL