Skip to content

Commit 7adf458

Browse files
committed
feat: 接入Sentry用户IP信息
1 parent 00dbc16 commit 7adf458

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ def before_send(event, hint):
6464
traces_sample_rate=1.0,
6565
)
6666

67+
# 只使用ip判断
68+
sentry_sdk.set_user({"ip_address": "{{auto}}"})
69+
6770
wm.app_start_time = time.perf_counter()
6871

6972
shared_memory, is_first_instance = check_single_instance()

0 commit comments

Comments
 (0)