Skip to content

Commit

Permalink
datadog integration worked
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanCarloMachado committed Jun 25, 2024
1 parent 21c9a7e commit 5a50cc1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
14 changes: 8 additions & 6 deletions python_search/search/search_ui/search_utils.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@

from datadog import initialize, statsd
def setup_datadog():
from datadog import initialize, statsd
options = {
'statsd_host':'127.0.0.1',
'statsd_port':8125,
}

options = {
'statsd_host':'127.0.0.1',
'statsd_port':8125
}
initialize(**options)

initialize(**options)
return statsd
11 changes: 11 additions & 0 deletions tests/test_datadog.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@


def test_datadog():
from python_search.search.search_ui.search_utils import setup_datadog

statsd = setup_datadog()
assert statsd is not None
# change the range to debug when needed
for i in range(1):
print(i)
statsd.increment('test.increment')

0 comments on commit 5a50cc1

Please sign in to comment.