Documentation
¶
Overview ¶
Package metricskey declares the metric descriptors emitted by porto's HTTP and gRPC servers (request latency and per-role counters, deployed version, logged-error counter). Metrics lists them all so appinit.Metrics can register help text with the Prometheus sink.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // HTTPReqPerf samples HTTP request latency by verb, status and URI // (restserver/telemetry). HTTPReqPerf = metrics.Describe{ Name: "http_requests_perf", Type: metrics.TypeSample, RequiredTags: []string{"verb", "status", "uri"}, Help: "provides quantiles for HTTP request.", } // HTTPReqByRole counts HTTP requests by verb, status, URI and caller role. HTTPReqByRole = metrics.Describe{ Name: "http_requests_role", Type: metrics.TypeCounter, RequiredTags: []string{"verb", "status", "uri", "role"}, Help: "provides counts for HTTP request by role.", } // GRPCReqPerf samples gRPC request latency by API and status code (gserver). GRPCReqPerf = metrics.Describe{ Name: "rpc_requests_perf", Type: metrics.TypeSample, RequiredTags: []string{"api", "status"}, Help: "provides quantiles for gRPC request.", } // GRPCReqByRole counts gRPC requests by API, status code and caller role. GRPCReqByRole = metrics.Describe{ Name: "rpc_requests_role", Type: metrics.TypeCounter, RequiredTags: []string{"api", "status", "role"}, Help: "provides counts for gRPC request by role.", } // StatsVersion is a gauge set to the commit number by appinit.Metrics. StatsVersion = metrics.Describe{ Type: metrics.TypeGauge, Name: "version", Help: "version provides the deployed version", } // HealthLogErrors counts errors written to the log, by package and build // (incremented from the xlog error hook installed by appinit.Metrics). HealthLogErrors = metrics.Describe{ Type: metrics.TypeCounter, Name: "log_errors", Help: "log_errors provides the counter of errors in logs", RequiredTags: []string{"pkg", "build"}, } )
Descriptors of the metrics emitted by this repo.
var Metrics = []*metrics.Describe{ &HTTPReqPerf, &HTTPReqByRole, &GRPCReqPerf, &GRPCReqByRole, &StatsVersion, &HealthLogErrors, }
Metrics lists every descriptor in this package, for registering help text with a sink (see appinit.Metrics).
Functions ¶
This section is empty.
Types ¶
This section is empty.