From 09f999ace24c500bdffb3642e45d2f6c150c5562 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Tue, 14 Jan 2025 09:50:32 -0500 Subject: [PATCH] more sentry context client init --- eve/clients/discord/client.py | 4 +++- eve/clients/telegram/client.py | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/eve/clients/discord/client.py b/eve/clients/discord/client.py index 9c4cf12..66f8284 100644 --- a/eve/clients/discord/client.py +++ b/eve/clients/discord/client.py @@ -400,7 +400,9 @@ def start( agent_name = os.getenv("EDEN_AGENT_USERNAME") agent = Agent.load(agent_name) with sentry_sdk.configure_scope() as scope: - scope.set_tag("client", "discord") + scope.set_tag("package", "eve-clients") + scope.set_tag("client_platform", "discord") + scope.set_tag("client_agent", agent_name) scope.set_context("discord", {"agent": agent_name, "local": local}) logger.info(f"Launching Discord bot {agent.username}...") diff --git a/eve/clients/telegram/client.py b/eve/clients/telegram/client.py index de141a2..ab47028 100644 --- a/eve/clients/telegram/client.py +++ b/eve/clients/telegram/client.py @@ -352,8 +352,10 @@ def start(env: str, local: bool = False) -> None: agent = Agent.load(agent_name) with sentry_sdk.configure_scope() as scope: + scope.set_tag("package", "eve-clients") scope.set_tag("client_platform", "telegram") scope.set_tag("client_agent", agent_name) + scope.set_context("telegram", {"agent": agent_name, "local": local}) bot_token = os.getenv("CLIENT_TELEGRAM_TOKEN") if not bot_token: