MCPcopy Create free account
hub / github.com/getsentry/sentry / create_event

Function create_event

tests/sentry/api/endpoints/test_source_map_debug.py:52–74  ·  view source on GitHub ↗
(
    exceptions: list[dict[str, Any]] | None = None,
    debug_meta_images: list[dict[str, Any]] | None = None,
    sdk: dict[str, Any] | None = None,
    release: str | None = None,
    dist: str | None = None,
    scraping_attempts: list[dict[str, Any]] | None = None,
)

Source from the content-addressed store, hash-verified

50
51
52def create_event(
53 exceptions: list[dict[str, Any]] | None = None,
54 debug_meta_images: list[dict[str, Any]] | None = None,
55 sdk: dict[str, Any] | None = None,
56 release: str | None = None,
57 dist: str | None = None,
58 scraping_attempts: list[dict[str, Any]] | None = None,
59) -> dict[str, Any]:
60 exceptions = [] if exceptions is None else exceptions
61 event = {
62 "event_id": "a" * 32,
63 "release": release,
64 "dist": dist,
65 "exception": {"values": exceptions},
66 "debug_meta": None if debug_meta_images is None else {"images": debug_meta_images},
67 "sdk": sdk,
68 "scraping_attempts": scraping_attempts,
69 }
70
71 if scraping_attempts is not None:
72 event["scraping_attempts"] = scraping_attempts
73
74 return event
75
76
77class SourceMapDebugEndpointTestCase(APITestCase):

Calls

no outgoing calls

Tested by

no test coverage detected