|
| 1 | +issue = { |
| 2 | + "id": "123", |
| 3 | + "shortId": "IPE-1", |
| 4 | + "title": "Error #1: This is a test error!", |
| 5 | + "culprit": "SentryCustomError(frontend/src/util)", |
| 6 | + "level": "error", |
| 7 | + "status": "unresolved", |
| 8 | + "statusDetails": {}, |
| 9 | + "isPublic": False, |
| 10 | + "platform": "javascript", |
| 11 | + "project": { |
| 12 | + "id": "456", |
| 13 | + "name": "ipe", |
| 14 | + "slug": "ipe", |
| 15 | + "platform": "javascript-react", |
| 16 | + }, |
| 17 | + "type": "error", |
| 18 | + "metadata": { |
| 19 | + "value": "This is a test error!", |
| 20 | + "type": "Another Error #1", |
| 21 | + "filename": "/frontend/src/util.ts", |
| 22 | + "function": "SentryCustomError", |
| 23 | + "display_title_with_tree_label": False, |
| 24 | + }, |
| 25 | + "numComments": 0, |
| 26 | + "assignedTo": { |
| 27 | + "email": "person@example.com", |
| 28 | + "type": "user", |
| 29 | + "id": "789", |
| 30 | + "name": "Person", |
| 31 | + }, |
| 32 | + "isBookmarked": False, |
| 33 | + "isSubscribed": False, |
| 34 | + "hasSeen": False, |
| 35 | + "isUnhandled": False, |
| 36 | + "count": "1", |
| 37 | + "userCount": 1, |
| 38 | + "firstSeen": "2022-04-04T18:17:18.320000Z", |
| 39 | + "lastSeen": "2022-04-04T18:17:18.320000Z", |
| 40 | +} |
| 41 | + |
| 42 | +event = { |
| 43 | + "event_id": "def456", |
| 44 | + "platform": issue["platform"], |
| 45 | + "datetime": issue["firstSeen"], |
| 46 | + "culprit": issue["culprit"], |
| 47 | + "metadata": issue["metadata"], |
| 48 | + "title": issue["title"], |
| 49 | + "issue_id": issue["id"], |
| 50 | + "environment": "production", |
| 51 | + "web_url": f"https://sentry.io/organizations/lxyz/issues/{issue['id']}/events/def456/", |
| 52 | + "breadcrumbs": {}, |
| 53 | + "contexts": {}, |
| 54 | + "sdk": {}, |
| 55 | +} |
0 commit comments