Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeRequestWriter ¶
type FakeRequestWriter struct { }
func (*FakeRequestWriter) Write ¶
func (f *FakeRequestWriter) Write(ctx context.Context, database string, wr prompb.WriteRequest) error
type Handler ¶
type Handler struct { Path string // DropLabels is a map of metric names regexes to label name regexes. When both match, the label will be dropped. DropLabels map[*regexp.Regexp]*regexp.Regexp // DropMetrics is a slice of regexes that drops metrics when the metric name matches. The metric name format // should match the Prometheus naming style before the metric is translated to a Kusto table name. DropMetrics []*regexp.Regexp // contains filtered or unexported fields }
func NewHandler ¶
func NewHandler(opts HandlerOpts) *Handler
func (*Handler) HandleReceive ¶
func (s *Handler) HandleReceive(w http.ResponseWriter, r *http.Request)
HandleReceive handles the prometheus remote write requests and writes them to the store.
type HandlerOpts ¶
type HandlerOpts struct { // Path is the path where the handler will be registered. Path string RequestTransformer interface { TransformWriteRequest(req *prompb.WriteRequest) *prompb.WriteRequest } // RequestWriter is the interface that writes the time series to a destination. RequestWriter RequestWriter // Health is the interface that determines if the service is healthy. HealthChecker HealthChecker // Database is the name of the Kusto database where time series will be written. Database string }
type HealthChecker ¶
type HealthChecker interface {
IsHealthy() bool
}
type RequestWriter ¶
type RequestWriter interface { // Write writes the time series to the correct peer. Write(ctx context.Context, wr *prompb.WriteRequest) error }
type SeriesCounter ¶
Click to show internal directories.
Click to hide internal directories.