-
Notifications
You must be signed in to change notification settings - Fork 502
Expand file tree
/
Copy pathopenfeature.py
More file actions
51 lines (41 loc) · 1.31 KB
/
openfeature.py
File metadata and controls
51 lines (41 loc) · 1.31 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
"""
OpenFeature configuration settings.
"""
from ddtrace.internal.settings._core import DDConfig
class OpenFeatureConfig(DDConfig):
"""
Configuration for OpenFeature provider and exposure reporting.
"""
# Experimental flagging provider
experimental_flagging_provider_enabled = DDConfig.var(
bool,
"DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED",
default=False,
)
# Feature flag exposure intake configuration
ffe_intake_enabled = DDConfig.var(
bool,
"DD_FFE_INTAKE_ENABLED",
default=True,
)
ffe_intake_heartbeat_interval = DDConfig.var(
float,
"DD_FFE_INTAKE_HEARTBEAT_INTERVAL",
default=1.0,
)
# Provider initialization timeout in milliseconds.
# Controls how long initialize() blocks waiting for the first Remote Config payload.
# Default is 30000ms (30 seconds), matching Java, Go, and Node.js SDKs.
initialization_timeout_ms = DDConfig.var(
int,
"DD_EXPERIMENTAL_FLAGGING_PROVIDER_INITIALIZATION_TIMEOUT_MS",
default=30000,
)
_openfeature_config_keys = [
"experimental_flagging_provider_enabled",
"ffe_intake_enabled",
"ffe_intake_heartbeat_interval",
"initialization_timeout_ms",
]
# Global config instance
config = OpenFeatureConfig()