📈(langfuse) add user FQDN to trace metadata
This will allow use to improve according to user origin.
This commit is contained in:
@@ -357,6 +357,9 @@ class AIAgentService: # pylint: disable=too-many-instance-attributes
|
||||
langfuse.update_current_trace(
|
||||
session_id=str(self.conversation.pk),
|
||||
user_id=str(self.user.sub),
|
||||
metadata={
|
||||
"user_fqdn": self.user.email.split("@")[-1], # no need for security here
|
||||
},
|
||||
)
|
||||
|
||||
history = ModelMessagesTypeAdapter.validate_python(self.conversation.pydantic_messages)
|
||||
|
||||
Reference in New Issue
Block a user