File tree Expand file tree Collapse file tree
openviking/observability/usage_audit Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ Observability Event Bus
8383| --- | --- | --- |
8484| ` enabled ` | ` true ` | 是否启用 Usage/Audit |
8585| ` backend ` | ` "sqlite" ` | 当前仅支持 SQLite |
86- | ` sqlite_path ` | ` null ` | SQLite 文件路径;为空时使用 OpenViking workspace 下的 ` usage_audit.sqlite3 ` |
86+ | ` sqlite_path ` | ` null ` | SQLite 文件路径;为空时使用 OpenViking workspace 下的 ` _system/usage_audit/ usage_audit.sqlite3` |
8787| ` queue_size ` | ` 10000 ` | 后台写入队列大小 |
8888| ` batch_size ` | ` 500 ` | 单次批量写入的最大事件数 |
8989| ` flush_interval_seconds ` | ` 1.0 ` | worker 定时 flush 间隔 |
@@ -409,7 +409,7 @@ Console BFF 查询的是账号级聚合和审计明细,当前只允许 `ROOT`
409409如果没有配置 ` sqlite_path ` ,默认在 OpenViking workspace 下:
410410
411411``` text
412- <workspace>/usage_audit.sqlite3
412+ <workspace>/_system/usage_audit/ usage_audit.sqlite3
413413```
414414
415415可以通过 ` server.observability.usage_audit.sqlite_path ` 显式指定。
Original file line number Diff line number Diff line change 2424logger = logging .getLogger (__name__ )
2525
2626_SUBSCRIBER_NAME = "usage_audit"
27+ _DEFAULT_SQLITE_RELATIVE_PATH = Path ("_system" ) / "usage_audit" / "usage_audit.sqlite3"
2728
2829
2930@dataclass (slots = True )
@@ -45,7 +46,7 @@ def _resolve_sqlite_path(config: ServerConfig) -> Path:
4546 workspace = Path (ov_config .storage .workspace ).expanduser ().resolve ()
4647 except Exception : # noqa: BLE001
4748 workspace = DEFAULT_CONFIG_DIR
48- return workspace / "usage_audit.sqlite3"
49+ return workspace / _DEFAULT_SQLITE_RELATIVE_PATH
4950
5051
5152async def init_usage_audit_from_server_config (
You can’t perform that action at this time.
0 commit comments