mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-14 09:03:16 +00:00
Merge 56befa98d8 into 72228db5c6
This commit is contained in:
commit
bb7dfbc5ef
2 changed files with 7 additions and 0 deletions
|
|
@ -3097,6 +3097,12 @@ class PrometheusLogger(CustomLogger):
|
|||
model_id=model_id,
|
||||
api_provider=api_provider,
|
||||
stream=(str(request_data.get("stream")) if litellm.prometheus_emit_stream_label else None),
|
||||
service_tier=(
|
||||
request_data.get("service_tier")
|
||||
if isinstance(request_data.get("service_tier"), str)
|
||||
and request_data.get("service_tier") in KNOWN_REQUEST_SERVICE_TIERS
|
||||
else None
|
||||
),
|
||||
)
|
||||
_label_ctx: Final = PrometheusLabelFactoryContext(enum_values)
|
||||
PrometheusLogger._inc_labeled_counter(
|
||||
|
|
|
|||
|
|
@ -515,6 +515,7 @@ class PrometheusMetricLabels:
|
|||
UserAPIKeyLabelNames.USER_EMAIL.value,
|
||||
UserAPIKeyLabelNames.EXCEPTION_STATUS.value,
|
||||
UserAPIKeyLabelNames.EXCEPTION_CLASS.value,
|
||||
UserAPIKeyLabelNames.SERVICE_TIER.value,
|
||||
# ``rate_limit_category`` / ``rate_limit_type`` are appended in
|
||||
# ``get_labels()`` when ``litellm.prometheus_emit_rate_limit_labels``
|
||||
# is True. Kept opt-in so existing dashboards keyed on this metric's
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue