Skip to content

Commit

Permalink
stringify None values
Browse files Browse the repository at this point in the history
  • Loading branch information
ancalita committed Aug 19, 2024
1 parent a4bac8e commit b0768f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rasa_sdk/tracing/instrumentation/attribute_extractors.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def extract_attrs_for_action_executor(
:param action_call: The `ActionCall` argument.
:return: A dictionary containing the attributes.
"""
attributes = {"sender_id": action_call["sender_id"]}
attributes = {"sender_id": action_call.get("sender_id", "None")}
action_name = action_call.get("next_action")

if action_name:
Expand Down
2 changes: 1 addition & 1 deletion rasa_sdk/tracing/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def set_span_attributes(span: Any, action_call: dict) -> None:
"next_action": action_call.get("next_action"),
"version": action_call.get("version"),
"sender_id": tracker.get("sender_id"),
"message_id": tracker.get("latest_message", {}).get("message_id"),
"message_id": tracker.get("latest_message", {}).get("message_id", "None"),
}

if span.is_recording():
Expand Down

0 comments on commit b0768f8

Please sign in to comment.