File tree Expand file tree Collapse file tree 3 files changed +19
-12
lines changed
Expand file tree Collapse file tree 3 files changed +19
-12
lines changed Original file line number Diff line number Diff line change 2121from veadk .configs .database_configs import (
2222 MysqlConfig ,
2323 OpensearchConfig ,
24- PrometheusConfig ,
2524 RedisConfig ,
2625 TOSConfig ,
2726 VikingKnowledgebaseConfig ,
2827)
2928from veadk .configs .model_configs import ModelConfig
3029from veadk .configs .tool_configs import BuiltinToolConfigs , PromptPilotConfig
31- from veadk .configs .tracing_configs import APMPlusConfig , CozeloopConfig , TLSConfig
30+ from veadk .configs .tracing_configs import (
31+ APMPlusConfig ,
32+ CozeloopConfig ,
33+ PrometheusConfig ,
34+ TLSConfig ,
35+ )
3236from veadk .utils .misc import set_envs
3337
3438
Original file line number Diff line number Diff line change 1515import os
1616from functools import cached_property
1717
18- from pydantic import BaseModel
1918from pydantic_settings import BaseSettings , SettingsConfigDict
2019
2120from veadk .consts import DEFAULT_TOS_BUCKET_NAME
@@ -60,15 +59,9 @@ class RedisConfig(BaseSettings):
6059 db : int = 0
6160
6261
63- class PrometheusConfig (BaseSettings ):
64- pushgateway_url : str = ""
62+ class VikingKnowledgebaseConfig (BaseSettings ):
63+ model_config = SettingsConfigDict ( env_prefix = "DATABASE_VIKING_" )
6564
66- pushgateway_username : str = ""
67-
68- pushgateway_password : str = ""
69-
70-
71- class VikingKnowledgebaseConfig (BaseModel ):
7265 project : str = "default"
7366 """User project in Volcengine console web."""
7467
Original file line number Diff line number Diff line change 1616from functools import cached_property
1717
1818from pydantic import Field
19- from pydantic_settings import BaseSettings
19+ from pydantic_settings import BaseSettings , SettingsConfigDict
2020
2121from veadk .auth .veauth .apmplus_veauth import APMPlusVeAuth
2222from veadk .consts import (
@@ -81,3 +81,13 @@ def otel_exporter_topic_id(self) -> str:
8181 or VeTLS ().get_trace_topic_id ()
8282 )
8383 return _topic_id
84+
85+
86+ class PrometheusConfig (BaseSettings ):
87+ model_config = SettingsConfigDict (env_prefix = "OBSERVABILITY_PROMETHEUS_" )
88+
89+ pushgateway_url : str = ""
90+
91+ pushgateway_username : str = ""
92+
93+ pushgateway_password : str = ""
You can’t perform that action at this time.
0 commit comments