Documentation
¶
Overview ¶
Package metrics exposes Prometheus metrics for a Tern app, with no dependencies:
ternApp(kit.WithPlugins(metrics.New()))
GET /metrics serves, in the Prometheus text format:
tern_http_requests_total{method,route,status}
tern_http_request_duration_seconds{method,route} (histogram)
tern_http_requests_in_flight
go_goroutines, go_memstats_heap_alloc_bytes, process_uptime_seconds
The route label is the route's pattern, such as /projects/[id], never the raw URL, so the number of series stays bounded. Requests that match no route (assets, 404s) are labeled "other".
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Plugin)
Option configures the plugin.
Click to show internal directories.
Click to hide internal directories.