kutt
kutt copied to clipboard
Implement metrics routes
Hey,
Following the previous aborted try to implement the /metrics/
route, this pull request brings this feature.
Added metrics
- [x] Default Node.js metrics
- [x] Histogram about response duration
response_duration_bucket{le="0.005",method="GET",path="/api/v2/metrics",status="200"} 41
response_duration_bucket{le="0.01",method="GET",path="/api/v2/metrics",status="200"} 42
response_duration_bucket{le="0.025",method="GET",path="/api/v2/metrics",status="200"} 42
response_duration_bucket{le="0.05",method="GET",path="/api/v2/metrics",status="200"} 42
response_duration_bucket{le="0.1",method="GET",path="/api/v2/metrics",status="200"} 42
response_duration_bucket{le="0.25",method="GET",path="/api/v2/metrics",status="200"} 42
response_duration_bucket{le="0.5",method="GET",path="/api/v2/metrics",status="200"} 42
response_duration_bucket{le="1",method="GET",path="/api/v2/metrics",status="200"} 42
response_duration_bucket{le="2.5",method="GET",path="/api/v2/metrics",status="200"} 42
response_duration_bucket{le="5",method="GET",path="/api/v2/metrics",status="200"} 42
response_duration_bucket{le="10",method="GET",path="/api/v2/metrics",status="200"} 42
response_duration_bucket{le="+Inf",method="GET",path="/api/v2/metrics",status="200"} 42
response_duration_sum{method="GET",path="/api/v2/metrics",status="200"} 0.136589004
response_duration_count{method="GET",path="/api/v2/metrics",status="200"} 42
- [x] Count of created links
# HELP link_counter Number of link created
# TYPE link_counter counter
link_counter 4
Hey, It is ready to be reviewed and to bring a first valued step! Thank you a lot
@poeti8 what do you think about this feature ?