mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-17 08:57:35 +08:00
feat: add sentry sdk
This commit is contained in:
@@ -2,14 +2,25 @@ import collections
|
||||
import json
|
||||
import os.path
|
||||
import platform
|
||||
import uuid
|
||||
from typing import Dict, List, Any
|
||||
|
||||
import sentry_sdk
|
||||
from loguru import logger
|
||||
|
||||
from httprunner import __version__
|
||||
from httprunner import exceptions
|
||||
|
||||
|
||||
def init_sentry_sdk():
|
||||
sentry_sdk.init(
|
||||
dsn="https://460e31339bcb428c879aafa6a2e78098@sentry.io/5263855",
|
||||
release="httprunner@{}".format(__version__),
|
||||
)
|
||||
with sentry_sdk.configure_scope() as scope:
|
||||
scope.set_user({"id": uuid.getnode()})
|
||||
|
||||
|
||||
def set_os_environ(variables_mapping):
|
||||
""" set variables mapping to os.environ
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user