kutt icon indicating copy to clipboard operation
kutt copied to clipboard

Implement metrics routes

Open Tchoupinax opened this issue 1 year ago • 2 comments

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

Tchoupinax avatar Jun 28 '23 11:06 Tchoupinax

Hey, It is ready to be reviewed and to bring a first valued step! Thank you a lot

Tchoupinax avatar Jul 04 '23 06:07 Tchoupinax

@poeti8 what do you think about this feature ?

nlamirault avatar Jul 04 '23 10:07 nlamirault