Documentation
¶
Overview ¶
Package metrics provides Prometheus metrics for OpenPass MCP server.
It instruments MCP tool calls, authentication denials, approval outcomes, and vault operations with counters and histograms suitable for monitoring and alerting in production deployments.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RecordApproval ¶
func RecordApproval(agent, outcome string)
RecordApproval records an approval outcome for a write operation. outcome should be "granted" or "denied".
func RecordAuthDenial ¶
func RecordAuthDenial(reason, agent string)
RecordAuthDenial records an authentication or authorization denial. reason should describe why access was denied (e.g., "scope_denied", "write_denied").
func RecordMCPRequest ¶
RecordMCPRequest records an MCP tool request with its duration. status should be "success" or "error".
func RecordVaultOperation ¶
func RecordVaultOperation(operation, status string)
RecordVaultOperation records a vault operation. operation describes the action (e.g., "read", "write", "delete"). status should be "success" or "error".
func Registry ¶
func Registry() *prometheus.Registry
Registry returns the Prometheus registry used by OpenPass. Use this with promhttp.HandlerFor to serve metrics over HTTP.
Types ¶
This section is empty.