Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prometheus Metrics #9

Closed
sv2 opened this issue Aug 19, 2017 · 1 comment
Closed

Prometheus Metrics #9

sv2 opened this issue Aug 19, 2017 · 1 comment
Assignees

Comments

@sv2
Copy link
Collaborator

sv2 commented Aug 19, 2017

Expose metrics for Prometheus via /swagger-stats/metrics API

@sv2 sv2 added this to 0.90.2 in swagger-stats Aug 19, 2017
@sv2 sv2 self-assigned this Sep 1, 2017
@sv2
Copy link
Collaborator Author

sv2 commented Sep 1, 2017

Prometheus metrics are exposed now via /swagger-stats/metrics API.

Example:

$ curl http://<your app host:port>/swagger-stats/metrics
# HELP api_all_request_total The total number of all API requests received
# TYPE api_all_request_total counter
api_all_request_total 88715
# HELP api_all_success_total The total number of all API requests with success response
# TYPE api_all_success_total counter
api_all_success_total 49051
. . . . . 

The following metrics are provided:

Name Type Help
api_all_request_total counter The total number of all API requests received
api_all_success_total counter The total number of all API requests with success response
api_all_errors_total counter The total number of all API requests with error response
api_all_client_error_total counter The total number of all API requests with client error response
api_all_server_error_total counter The total number of all API requests with server error response
api_all_request_in_processing_total gauge The total number of all API requests currently in processing (no response yet)
nodejs_process_memory_rss_bytes gauge Node.js process resident memory (RSS) bytes
nodejs_process_memory_heap_total_bytes gauge Node.js process memory heapTotal bytes
nodejs_process_memory_heap_used_bytes gauge Node.js process memory heapUsed bytes
nodejs_process_memory_external_bytes gauge Node.js process memory external bytes
nodejs_process_cpu_usage_percentage gauge Node.js process CPU usage percentage
api_request_total counter The total number of all API requests
api_request_duration_milliseconds histogram API requests duration
api_request_size_bytes histogram API requests size
api_response_size_bytes histogram API response size

Added Grafana dashboard, see dashboards/prometheus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant