Skip to content

Commit d651e41

Browse files
ehabel-kadylnagel
authored andcommitted
add asgi.py
1 parent d8a88da commit d651e41

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

django_datadog_logger/asgi.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from asgiref.local import Local
2+
3+
local = Local()
4+
5+
6+
def get_asgi_request():
7+
try:
8+
return local.request
9+
except AttributeError:
10+
return None
11+
12+
13+
__all__ = ["local", "get_asgi_request"]

0 commit comments

Comments
 (0)