Skip to content

Commit

Permalink
Merge pull request #37 from marzukr/ddstats
Browse files Browse the repository at this point in the history
FIx statsd
  • Loading branch information
marzukr authored Dec 22, 2024
2 parents 273f334 + b687cbf commit 2287594
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 2 additions & 3 deletions api/src/app.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Webserver for the FISHBAIT web interface."""

from typing import Any
import os

from flask import Flask, request, make_response
from werkzeug.exceptions import BadRequest
Expand All @@ -24,8 +23,8 @@

app = Flask(__name__)
log = get_logger(__name__)
if os.getenv('DD_SERVICE'):
datadog.initialize()
if settings.DD_AGENT_HOST:
datadog.initialize(statsd_host=settings.DD_AGENT_HOST)

def handle_api_error(e: ApiError):
return e.flask_tuple()
Expand Down
2 changes: 2 additions & 0 deletions api/src/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@

REDIS_SESSION_DB: int = 0
REDIS_CELERY_DB: int = 1

DD_AGENT_HOST = os.getenv("DD_AGENT_HOST")

0 comments on commit 2287594

Please sign in to comment.