Skip to content

Commit

Permalink
Improve naming of metrics.
Browse files Browse the repository at this point in the history
  • Loading branch information
philwinder committed Nov 9, 2017
1 parent c5026df commit 04eef83
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
app = Flask(__name__)

# A counter to count the total number of HTTP requests
REQUESTS = Counter('http_requests_total', 'Total HTTP Requests (count)', ['method', 'endpoint'])
REQUESTS = Counter('http_request_total', 'Total HTTP Requests (count)', ['method', 'endpoint'])

# A gauge (i.e. goes up and down) to monitor the total number of in progress requests
IN_PROGRESS = Gauge('http_requests_inprogress', 'Number of in progress HTTP requests')
IN_PROGRESS = Gauge('http_request_inprogress', 'Number of in progress HTTP requests')

# A histogram to measure the latency of the HTTP requests
TIMINGS = Histogram('http_requests_latency_seconds', 'HTTP request latency (seconds)')
TIMINGS = Histogram('http_request_duration_seconds', 'HTTP request latency (seconds)')


# Standard Flask route stuff.
Expand Down

0 comments on commit 04eef83

Please sign in to comment.