-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy path__init__.py
More file actions
26 lines (16 loc) · 802 Bytes
/
__init__.py
File metadata and controls
26 lines (16 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from datadog_lambda.cold_start import initialize_cold_start_tracing
import os
if os.environ.get("DD_INSTRUMENTATION_TELEMETRY_ENABLED") is None:
os.environ["DD_INSTRUMENTATION_TELEMETRY_ENABLED"] = "false"
if os.environ.get("DD_API_SECURITY_ENABLED") is None:
os.environ["DD_API_SECURITY_ENABLED"] = "False"
initialize_cold_start_tracing()
# The minor version corresponds to the Lambda layer version.
# E.g.,, version 0.5.0 gets packaged into layer version 5.
from datadog_lambda.version import __version__ # noqa: E402 F401
from datadog_lambda.logger import initialize_logging # noqa: E402
initialize_logging(__name__)
from datadog_lambda.patch import patch_all # noqa: E402
# Patch third-party libraries for tracing, must be done before importing any
# handler code.
patch_all()