Documentation
¶
Index ¶
Constants ¶
const (
MetricsURI = "/apisix/prometheus/metrics"
)
Variables ¶
This section is empty.
Functions ¶
func MetricsHandler ¶
func MetricsHandler(w http.ResponseWriter, r *http.Request)
Types ¶
type Plugin ¶
type Plugin struct {
base.BasePlugin
// contains filtered or unexported fields
}
func (*Plugin) RunLogPhase ¶
func (p *Plugin) RunLogPhase(snapshot base.LogSnapshot) error
RunLogPhase owns request metrics for an effective Prometheus binding. The log executor invokes this callback once after response completion (including APISIX-generated responses), while the main server owns the process-level request-total gauge and the route variable initializer remains metrics-free.
func (*Plugin) SetResourceContext ¶
SetResourceContext supplies route/service identity that is not part of the user-facing Prometheus plugin schema. The builder calls this for every materialized binding, including global bindings evaluated for a route.