Skip to content

Commit

Permalink
Update app.py
Browse files Browse the repository at this point in the history
  • Loading branch information
VoronM1522 authored Feb 26, 2025
1 parent 0afc4dd commit cb4bdcb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app_python/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Prometheus metrics
REQUEST_COUNT = Counter('app_request_count', 'Total number of requests')
REQUEST_TIME = Gauge('app_request_time_seconds',
REQUEST_TIME = Gauge('app_request_time_seconds',
'Time spent processing requests')
ERROR_COUNT = Counter('app_error_count', 'Total number of errors')

Expand Down Expand Up @@ -47,7 +47,7 @@ def current_time() -> str:

time = datetime.now(TIME_ZONE)
REQUEST_COUNT.inc() # Increment request counter
REQUEST_TIME.set((datetime.now() - \
REQUEST_TIME.set((datetime.now() -
start_time).total_seconds()) # Set request time

return f"Current time in {TIME_ZONE} is {time.strftime('%H:%M:%S')}"
Expand Down

0 comments on commit cb4bdcb

Please sign in to comment.