Skip to content

Commit

Permalink
more sentry context client init
Browse files Browse the repository at this point in the history
  • Loading branch information
jmilldotdev committed Jan 14, 2025
1 parent 637edd2 commit 09f999a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion eve/clients/discord/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}...")

Expand Down
2 changes: 2 additions & 0 deletions eve/clients/telegram/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 09f999a

Please sign in to comment.