Skip to content

Commit

Permalink
fixup! Introduce DD traces & metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
roekatz committed Feb 14, 2024
1 parent 0954e0e commit 6c8add9
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions packages/opal-common/opal_common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ class OpalCommonConfig(Confi):
LOG_FORMAT = confi.str(
"LOG_FORMAT",
confi.delay(
lambda LOG_FORMAT_INCLUDE_PID=False: _LOG_FORMAT_WITH_PID
if LOG_FORMAT_INCLUDE_PID
else _LOG_FORMAT_WITHOUT_PID
lambda LOG_FORMAT_INCLUDE_PID=False: (
_LOG_FORMAT_WITH_PID
if LOG_FORMAT_INCLUDE_PID
else _LOG_FORMAT_WITHOUT_PID
)
),
description="The format of the log messages",
)
Expand Down Expand Up @@ -159,5 +161,14 @@ class OpalCommonConfig(Confi):
description="List of extensions to serve as policy modules",
)

ENABLE_METRICS = confi.bool("ENABLE_METRICS", False)

# optional APM tracing with datadog
ENABLE_DATADOG_APM = confi.bool(
"ENABLE_DATADOG_APM",
False,
description="Set if OPAL server should enable tracing with datadog APM",
)


opal_common_config = OpalCommonConfig(prefix="OPAL_")

0 comments on commit 6c8add9

Please sign in to comment.