mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
style(prometheus): apply black formatting
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e0c711964f
commit
9d88a63ae6
1 changed files with 11 additions and 8 deletions
|
|
@ -974,9 +974,11 @@ class PrometheusLogger(CustomLogger):
|
|||
),
|
||||
client_ip=standard_logging_payload["metadata"].get("requester_ip_address"),
|
||||
user_agent=standard_logging_payload["metadata"].get("user_agent"),
|
||||
stream=str(standard_logging_payload.get("stream"))
|
||||
if litellm.prometheus_emit_stream_label
|
||||
else None,
|
||||
stream=(
|
||||
str(standard_logging_payload.get("stream"))
|
||||
if litellm.prometheus_emit_stream_label
|
||||
else None
|
||||
),
|
||||
)
|
||||
|
||||
if (
|
||||
|
|
@ -1490,8 +1492,7 @@ class PrometheusLogger(CustomLogger):
|
|||
# If an exception was provided (directly or via kwargs) but no status code
|
||||
# could be extracted, default to 500 — an unclassified server error is still a 5xx.
|
||||
if status_code is None and (
|
||||
exception is not None
|
||||
or (kwargs and kwargs.get("exception") is not None)
|
||||
exception is not None or (kwargs and kwargs.get("exception") is not None)
|
||||
):
|
||||
return 500
|
||||
|
||||
|
|
@ -1638,9 +1639,11 @@ class PrometheusLogger(CustomLogger):
|
|||
client_ip=_metadata.get("requester_ip_address"),
|
||||
user_agent=_metadata.get("user_agent"),
|
||||
model_id=model_id,
|
||||
stream=str(request_data.get("stream"))
|
||||
if litellm.prometheus_emit_stream_label
|
||||
else None,
|
||||
stream=(
|
||||
str(request_data.get("stream"))
|
||||
if litellm.prometheus_emit_stream_label
|
||||
else None
|
||||
),
|
||||
)
|
||||
_labels = prometheus_label_factory(
|
||||
supported_enum_labels=self.get_labels_for_metric(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue