We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 888ef6d commit 2ca873eCopy full SHA for 2ca873e
datadog_lambda/extension.py
@@ -1,14 +1,18 @@
1
import logging
2
import requests
3
+from os import path
4
5
AGENT_URL = "http://127.0.0.1:8124"
6
HELLO_PATH = "/lambda/hello"
7
FLUSH_PATH = "/lambda/flush"
8
+EXTENSION_PATH = "/opt/extensions/datadog-agent"
9
10
logger = logging.getLogger(__name__)
11
12
13
def is_extension_running():
14
+ if not path.exists(EXTENSION_PATH):
15
+ return False
16
try:
17
requests.get(AGENT_URL + HELLO_PATH)
18
except Exception as e:
0 commit comments