mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
fix(prometheus): include custom metadata and tag labels in known_labels to avoid false-positive warnings
This commit is contained in:
parent
d96ba405dd
commit
87d4c312c8
1 changed files with 5 additions and 0 deletions
|
|
@ -504,6 +504,11 @@ class PrometheusLogger(CustomLogger):
|
|||
"error_type",
|
||||
"hook_type",
|
||||
}
|
||||
# Include dynamic custom labels so we don't warn on valid user-defined names.
|
||||
known_labels.update(litellm.custom_prometheus_metadata_labels or [])
|
||||
known_labels.update(
|
||||
f"tag_{tag}" for tag in (litellm.custom_prometheus_tags or [])
|
||||
)
|
||||
for name in raw_metrics:
|
||||
if name not in defined_metrics:
|
||||
verbose_logger.warning(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue