Skip to content

Commit 02a24c3

Browse files
authored
Add sentry tags (#107)
Signed-off-by: cyc60 <[email protected]> Signed-off-by: cyc60 <[email protected]>
1 parent 736deb7 commit 02a24c3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

oracle/oracle/main.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from urllib.parse import urlparse
55

66
import aiohttp
7+
from eth_account import Account
78
from eth_account.signers.local import LocalAccount
89

910
from oracle.health_server import create_health_server_runner, start_health_server
@@ -160,6 +161,10 @@ async def process_network(
160161
from sentry_sdk.integrations.logging import ignore_logger
161162

162163
sentry_sdk.init(SENTRY_DSN, traces_sample_rate=0.1)
164+
sentry_sdk.set_tag("network", NETWORK)
165+
sentry_sdk.set_tag(
166+
"account", Account.from_key(NETWORK_CONFIG["ORACLE_PRIVATE_KEY"]).address
167+
)
163168
ignore_logger("backoff")
164169

165170
asyncio.run(main())

0 commit comments

Comments
 (0)