|
28 | 28 |
|
29 | 29 | logger = logging.getLogger(__name__) |
30 | 30 |
|
31 | | -# Environment variables for the aggregator agent |
32 | | -env_var_prefix = "RAY_DASHBOARD_AGGREGATOR_AGENT" |
33 | 31 | # Max number of threads for the thread pool executor handling CPU intensive tasks |
34 | 32 | THREAD_POOL_EXECUTOR_MAX_WORKERS = ray_constants.env_integer( |
35 | | - f"{env_var_prefix}_THREAD_POOL_EXECUTOR_MAX_WORKERS", 1 |
| 33 | + "RAY_DASHBOARD_AGGREGATOR_AGENT_THREAD_POOL_EXECUTOR_MAX_WORKERS", 1 |
36 | 34 | ) |
37 | 35 | # Interval to check the main thread liveness |
38 | 36 | CHECK_MAIN_THREAD_LIVENESS_INTERVAL_SECONDS = ray_constants.env_float( |
39 | | - f"{env_var_prefix}_CHECK_MAIN_THREAD_LIVENESS_INTERVAL_SECONDS", 0.1 |
| 37 | + "RAY_DASHBOARD_AGGREGATOR_AGENT_CHECK_MAIN_THREAD_LIVENESS_INTERVAL_SECONDS", 0.1 |
40 | 38 | ) |
41 | 39 | # Maximum size of the event buffer in the aggregator agent |
42 | 40 | MAX_EVENT_BUFFER_SIZE = ray_constants.env_integer( |
43 | | - f"{env_var_prefix}_MAX_EVENT_BUFFER_SIZE", 1000000 |
| 41 | + "RAY_DASHBOARD_AGGREGATOR_AGENT_MAX_EVENT_BUFFER_SIZE", 1000000 |
44 | 42 | ) |
45 | 43 | # Maximum number of events to send in a single batch to the destination |
46 | 44 | MAX_EVENT_SEND_BATCH_SIZE = ray_constants.env_integer( |
47 | | - f"{env_var_prefix}_MAX_EVENT_SEND_BATCH_SIZE", 10000 |
| 45 | + "RAY_DASHBOARD_AGGREGATOR_AGENT_MAX_EVENT_SEND_BATCH_SIZE", 10000 |
48 | 46 | ) |
49 | 47 | # Address of the external service to send events with format of "http://<ip>:<port>" |
50 | | -EVENTS_EXPORT_ADDR = os.environ.get(f"{env_var_prefix}_EVENTS_EXPORT_ADDR", "") |
| 48 | +EVENTS_EXPORT_ADDR = os.environ.get( |
| 49 | + "RAY_DASHBOARD_AGGREGATOR_AGENT_EVENTS_EXPORT_ADDR", "" |
| 50 | +) |
51 | 51 | # Event filtering configurations |
52 | 52 | # Comma-separated list of event types that are allowed to be exposed to external services |
53 | 53 | # Valid values: TASK_DEFINITION_EVENT, TASK_EXECUTION_EVENT, ACTOR_TASK_DEFINITION_EVENT, ACTOR_TASK_EXECUTION_EVENT |
|
60 | 60 | "NODE_DEFINITION_EVENT,NODE_LIFECYCLE_EVENT," |
61 | 61 | ) |
62 | 62 | EXPOSABLE_EVENT_TYPES = os.environ.get( |
63 | | - f"{env_var_prefix}_EXPOSABLE_EVENT_TYPES", DEFAULT_EXPOSABLE_EVENT_TYPES |
| 63 | + "RAY_DASHBOARD_AGGREGATOR_AGENT_EXPOSABLE_EVENT_TYPES", |
| 64 | + DEFAULT_EXPOSABLE_EVENT_TYPES, |
64 | 65 | ) |
65 | 66 | # flag to enable publishing events to the external HTTP service |
66 | 67 | PUBLISH_EVENTS_TO_EXTERNAL_HTTP_SERVICE = ray_constants.env_bool( |
67 | | - f"{env_var_prefix}_PUBLISH_EVENTS_TO_EXTERNAL_HTTP_SERVICE", True |
| 68 | + "RAY_DASHBOARD_AGGREGATOR_AGENT_PUBLISH_EVENTS_TO_EXTERNAL_HTTP_SERVICE", True |
68 | 69 | ) |
69 | 70 | # flag to control whether preserve the proto field name when converting the events to |
70 | 71 | # JSON. If True, the proto field name will be preserved. If False, the proto field name |
71 | 72 | # will be converted to camel case. |
72 | 73 | PRESERVE_PROTO_FIELD_NAME = ray_constants.env_bool( |
73 | | - f"{env_var_prefix}_PRESERVE_PROTO_FIELD_NAME", False |
| 74 | + "RAY_DASHBOARD_AGGREGATOR_AGENT_PRESERVE_PROTO_FIELD_NAME", False |
74 | 75 | ) |
75 | 76 |
|
76 | 77 |
|
|
0 commit comments