@@ -31,30 +31,6 @@ class ElasticsearchConfig(BaseModel):
3131
3232 Contains settings related to Elasticsearch server connectivity, authentication,
3333 TLS/SSL, request handling, node status management, and batch operation parameters.
34-
35- Attributes:
36- HOSTS (list[str]): List of Elasticsearch server hosts (e.g., ['https://localhost:9200']).
37- HTTP_USER_NAME (str | None): Username for HTTP authentication.
38- HTTP_PASSWORD (SecretStr | None): Password for HTTP authentication.
39- CA_CERTS (str | None): Path to CA bundle for SSL verification.
40- SSL_ASSERT_FINGERPRINT (str | None): SSL certificate fingerprint for verification.
41- VERIFY_CERTS (bool): Whether to verify SSL certificates.
42- CLIENT_CERT (str | None): Path to client certificate for TLS authentication.
43- CLIENT_KEY (str | None): Path to client key for TLS authentication.
44- HTTP_COMPRESS (bool): Whether to enable HTTP compression (gzip).
45- REQUEST_TIMEOUT (float | None): Timeout for HTTP requests in seconds.
46- MAX_RETRIES (int): Maximum number of retries per request.
47- RETRY_ON_TIMEOUT (bool): Whether to retry on connection timeouts.
48- RETRY_ON_STATUS (tuple[int, ...]): HTTP status codes to retry on.
49- IGNORE_STATUS (tuple[int, ...]): HTTP status codes to ignore as errors.
50- SNIFF_ON_START (bool): Whether to sniff nodes on client instantiation.
51- SNIFF_BEFORE_REQUESTS (bool): Whether to sniff nodes before requests.
52- SNIFF_ON_NODE_FAILURE (bool): Whether to sniff nodes on node failure.
53- MIN_DELAY_BETWEEN_SNIFFING (float): Minimum delay between sniffing attempts in seconds.
54- NODE_SELECTOR_CLASS (str): Node selector strategy ('round_robin' or 'random').
55- CONNECTIONS_PER_NODE (int): Number of HTTP connections per node.
56- DEAD_NODE_BACKOFF_FACTOR (float): Factor for calculating node timeout duration after failures.
57- MAX_DEAD_NODE_BACKOFF (float): Maximum timeout duration for a dead node in seconds.
5834 """
5935
6036 HOSTS : list [str ] = Field (default = ["https://localhost:9200" ], description = "List of Elasticsearch server hosts" )
@@ -821,30 +797,25 @@ class TemporalConfig(BaseModel):
821797
822798 Controls connection parameters, security settings, and timeout configurations
823799 for Temporal workflow orchestration services.
824-
825- Attributes:
826- HOST (str): Temporal server host address.
827- PORT (int): Temporal server port number.
828- NAMESPACE (str): Temporal namespace for workflow isolation.
829- TASK_QUEUE (str): Default task queue for workflow and activity execution.
830- TLS_CA_CERT (str | None): Path to TLS CA certificate for secure connections.
831- TLS_CLIENT_CERT (str | None): Path to TLS client certificate for mutual authentication.
832- TLS_CLIENT_KEY (str | None): Path to TLS client private key.
833- WORKFLOW_EXECUTION_TIMEOUT (int): Maximum workflow execution time in seconds.
834- WORKFLOW_RUN_TIMEOUT (int): Maximum single workflow run time in seconds.
835- WORKFLOW_TASK_TIMEOUT (int): Maximum workflow task processing time in seconds.
836- ACTIVITY_START_TO_CLOSE_TIMEOUT (int): Maximum activity execution time in seconds.
837- ACTIVITY_HEARTBEAT_TIMEOUT (int): Activity heartbeat timeout in seconds.
838- RETRY_MAXIMUM_ATTEMPTS (int): Maximum retry attempts for failed activities.
839- RETRY_BACKOFF_COEFFICIENT (float): Backoff multiplier for retry delays.
840- RETRY_MAXIMUM_INTERVAL (int): Maximum retry interval in seconds.
841800 """
842801
843802 HOST : str = Field (default = "localhost" , description = "Temporal server host address" )
844803 PORT : int = Field (default = 7233 , ge = 1 , le = 65535 , description = "Temporal server port number" )
845804 NAMESPACE : str = Field (default = "default" , description = "Temporal namespace for workflow isolation" )
846805 TASK_QUEUE : str = Field (default = "task-queue" , description = "Default task queue name" )
847806
807+ # Metrics Configuration
808+ ENABLE_METRICS : bool = Field (
809+ default = False ,
810+ description = "Enable Prometheus metrics collection for Temporal workflows and activities" ,
811+ )
812+ METRICS_PORT : int = Field (
813+ default = 8201 ,
814+ ge = 1 ,
815+ le = 65535 ,
816+ description = "Port for Temporal Prometheus metrics endpoint (separate from main Prometheus port)" ,
817+ )
818+
848819 # TLS Configuration
849820 TLS_CA_CERT : str | None = Field (default = None , description = "Path to TLS CA certificate" )
850821 TLS_CLIENT_CERT : str | None = Field (default = None , description = "Path to TLS client certificate" )
@@ -925,29 +896,6 @@ class ScyllaDBConfig(BaseModel):
925896 Contains settings related to ScyllaDB cluster connectivity, authentication,
926897 compression, consistency levels, connection management, retry policies,
927898 prepared statement caching, and health checks.
928-
929- Attributes:
930- CONTACT_POINTS (list[str]): List of ScyllaDB node addresses.
931- PORT (int): CQL native transport port number.
932- KEYSPACE (str | None): Default keyspace name.
933- USERNAME (str | None): Username for authentication.
934- PASSWORD (SecretStr | None): Password for authentication.
935- PROTOCOL_VERSION (int): Protocol version to use.
936- COMPRESSION (bool): Enable LZ4 compression.
937- CONNECT_TIMEOUT (int): Connection timeout in seconds.
938- REQUEST_TIMEOUT (int): Request timeout in seconds.
939- CONSISTENCY_LEVEL (Literal): Default consistency level.
940- DISABLE_SHARD_AWARENESS (bool): Disable shard awareness (default: False).
941- RETRY_POLICY (Literal): Retry policy type (default: "EXPONENTIAL_BACKOFF").
942- Options: "EXPONENTIAL_BACKOFF", "FALLTHROUGH", "DOWNGRADING_CONSISTENCY".
943- RETRY_MAX_NUM_RETRIES (float): Maximum number of retries for ExponentialBackoffRetryPolicy (default: 3.0).
944- RETRY_MIN_INTERVAL (float): Minimum interval in seconds between retries (default: 0.1).
945- RETRY_MAX_INTERVAL (float): Maximum interval in seconds between retries (default: 10.0).
946- ENABLE_PREPARED_STATEMENT_CACHE (bool): Enable prepared statement caching (default: True).
947- PREPARED_STATEMENT_CACHE_SIZE (int): Maximum cached prepared statements (default: 100).
948- PREPARED_STATEMENT_CACHE_TTL_SECONDS (int): TTL for cache in seconds (default: 3600).
949- HEALTH_CHECK_TIMEOUT (int): Timeout for health check queries in seconds (default: 5).
950- ENABLE_CONNECTION_POOL_MONITORING (bool): Enable pool monitoring (default: False).
951899 """
952900
953901 CONTACT_POINTS : list [str ] = Field (
0 commit comments