claws / aioprometheus

A Prometheus Python client library for asyncio-based applications
175 stars 21 forks source link

Add option to group similar status codes #62

Closed claws closed 3 years ago

claws commented 3 years ago

Update ASGI middleware to support an option that will group similar status codes used by the status_codes_counter default metric. It will now support reporting "2xx", "3xx", etc instead of say explicit 200, 201, etc.

codecov-commenter commented 3 years ago

Codecov Report

Merging #62 (eeacc09) into master (1d84221) will increase coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #62      +/-   ##
==========================================
+ Coverage   95.48%   95.50%   +0.01%     
==========================================
  Files          17       17              
  Lines         776      778       +2     
  Branches       99       99              
==========================================
+ Hits          741      743       +2     
  Misses         19       19              
  Partials       16       16              
Impacted Files Coverage Δ
src/aioprometheus/asgi/middleware.py 87.30% <100.00%> (+0.41%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1d84221...eeacc09. Read the comment docs.