mirror of
https://github.com/fawney19/Aether.git
synced 2026-01-02 15:52:26 +08:00
feat(metrics): add model alias resolution metrics
- model_alias_resolution_total: track resolution methods and cache hits - model_alias_resolution_duration_seconds: measure resolution performance - model_alias_conflict_total: monitor alias conflicts across GlobalModels
This commit is contained in:
@@ -44,3 +44,24 @@ health_open_circuits = Gauge(
|
||||
"health_open_circuits",
|
||||
"Number of provider keys currently in circuit breaker open state",
|
||||
)
|
||||
|
||||
# 模型别名解析相关
|
||||
model_alias_resolution_total = Counter(
|
||||
"model_alias_resolution_total",
|
||||
"Total number of model alias resolutions",
|
||||
["method", "cache_hit"],
|
||||
# method: direct_match, provider_model_name, alias, not_found
|
||||
# cache_hit: true, false
|
||||
)
|
||||
|
||||
model_alias_resolution_duration_seconds = Histogram(
|
||||
"model_alias_resolution_duration_seconds",
|
||||
"Duration of model alias resolution in seconds",
|
||||
["method"],
|
||||
buckets=[0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0], # 1ms 到 1s
|
||||
)
|
||||
|
||||
model_alias_conflict_total = Counter(
|
||||
"model_alias_conflict_total",
|
||||
"Total number of alias conflicts detected (same alias maps to multiple GlobalModels)",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user