-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
21c9a7e
commit 5a50cc1
Showing
2 changed files
with
19 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') |