-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I wold like to add /metrics as prothemeus format too, if it is possible. Prometheus are able to read in a text format, reading directly from metrics : GET /metrics.
PS: it should "reset" the couters after request, so we have the counters for the last time
The return should be something like:
# HELP log_calls_total Total number of calls to 'log' method
# TYPE log_calls_total counter
log_calls_total 1234
# HELP audit_calls_total Total number of calls to 'audit' method
# TYPE audit_calls_total counter
audit_calls_total 5678
# HELP error_calls_total Total number of calls to 'error' method
# TYPE error_calls_total counter
error_calls_total 910
# HELP info_calls_total Total number of calls to 'info' method
# TYPE info_calls_total counter
info_calls_total 345
# HELP current_log_level Current log level of the application
# TYPE current_log_level gauge
current_log_level{level="info"} 1
current_log_level{level="error"} 0
current_log_level{level="debug"} 0
current_log_level{level="warn"} 0
# HELP application_uptime_seconds How long the application has been running in seconds
# TYPE application_uptime_seconds gauge
application_uptime_seconds 3600
# HELP loglevel_change_timeout_seconds Seconds remaining until the log level changes back to default
# TYPE loglevel_change_timeout_seconds gauge
loglevel_change_timeout_seconds 120
with this we can create triggers to avoid send too many data to server (reduce cost) and alarms to notify our team about too many errors for example.
Collectors will check the numbers and stop sending data to server for example.
Originally posted by @raupp in #6 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request