Documentation ¶
Overview ¶
Package zipper exposes following non-monitoring endpoints:
- /metrics/find
- /render
- /info
Error codes policy (applies to find, render, info endpoints)
- if at least one backend succeeds, it's a success with code 200.
- if all bakends fail
- if all errors are not-found, it's a not found. But code is 200 + a monitoring counter incremented.
- if errors are of mixed type we fail with code 500.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BuildVersion string
BuildVersion is replaced by ldflags
View Source
var Metrics = struct { Requests *expvar.Int Responses *expvar.Int Errors *expvar.Int Goroutines expvar.Func Uptime expvar.Func FindRequests *expvar.Int FindErrors *expvar.Int RenderRequests *expvar.Int RenderErrors *expvar.Int InfoRequests *expvar.Int InfoErrors *expvar.Int Timeouts *expvar.Int CacheSize expvar.Func CacheItems expvar.Func CacheMisses *expvar.Int CacheHits *expvar.Int }{ Requests: expvar.NewInt("requests"), Responses: expvar.NewInt("responses"), Errors: expvar.NewInt("errors"), FindRequests: expvar.NewInt("find_requests"), FindErrors: expvar.NewInt("find_errors"), RenderRequests: expvar.NewInt("render_requests"), RenderErrors: expvar.NewInt("render_errors"), InfoRequests: expvar.NewInt("info_requests"), InfoErrors: expvar.NewInt("info_errors"), Timeouts: expvar.NewInt("timeouts"), CacheHits: expvar.NewInt("cache_hits"), CacheMisses: expvar.NewInt("cache_misses"), }
Metrics contains grouped expvars for /debug/vars and graphite
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App represents the main zipper runnable
type PrometheusMetrics ¶
type PrometheusMetrics struct { Requests prometheus.Counter Responses *prometheus.CounterVec RenderMismatches prometheus.Counter RenderFixedMismatches prometheus.Counter RenderMismatchedResponses prometheus.Counter Renders prometheus.Counter FindNotFound prometheus.Counter RequestCancel *prometheus.CounterVec DurationExp prometheus.Histogram DurationLin prometheus.Histogram RenderDurationExp prometheus.Histogram RenderOutDurationExp *prometheus.HistogramVec FindDurationExp prometheus.Histogram FindDurationLin prometheus.Histogram TimeInQueueExp prometheus.Histogram TimeInQueueLin prometheus.Histogram }
PrometheusMetrics keeps all the metrics exposed on /metrics endpoint
func NewPrometheusMetrics ¶
func NewPrometheusMetrics(config cfg.Zipper) *PrometheusMetrics
NewPrometheusMetrics creates a set of default Prom metrics
Click to show internal directories.
Click to hide internal directories.