forked from phoenix/litellm-mirror
fix use SLP status
This commit is contained in:
parent
d2b6054f0c
commit
48c4b272f7
1 changed files with 5 additions and 1 deletions
|
@ -259,6 +259,10 @@ class DataDogLogger(CustomBatchLogger):
|
||||||
if standard_logging_object is None:
|
if standard_logging_object is None:
|
||||||
raise ValueError("standard_logging_object not found in kwargs")
|
raise ValueError("standard_logging_object not found in kwargs")
|
||||||
|
|
||||||
|
status = DataDogStatus.INFO
|
||||||
|
if standard_logging_object.get("status") == "failure":
|
||||||
|
status = DataDogStatus.WARN
|
||||||
|
|
||||||
# Build the initial payload
|
# Build the initial payload
|
||||||
make_json_serializable(standard_logging_object)
|
make_json_serializable(standard_logging_object)
|
||||||
json_payload = json.dumps(standard_logging_object)
|
json_payload = json.dumps(standard_logging_object)
|
||||||
|
@ -271,7 +275,7 @@ class DataDogLogger(CustomBatchLogger):
|
||||||
hostname="",
|
hostname="",
|
||||||
message=json_payload,
|
message=json_payload,
|
||||||
service="litellm-server",
|
service="litellm-server",
|
||||||
status=DataDogStatus.INFO,
|
status=status,
|
||||||
)
|
)
|
||||||
return dd_payload
|
return dd_payload
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue