Title: No more last_event_id · Issue #3049 · getsentry/sentry-python · GitHub
Open Graph Title: No more last_event_id · Issue #3049 · getsentry/sentry-python
X Title: No more last_event_id · Issue #3049 · getsentry/sentry-python
Description: How do you use Sentry? Sentry Saas (sentry.io) Version 2.1.0 Steps to Reproduce https://develop.sentry.dev/sdk/features/#retrieve-last-event-id The method last_event_id does not exist anymore. I understand that's been deprecated but, how...
Open Graph Description: How do you use Sentry? Sentry Saas (sentry.io) Version 2.1.0 Steps to Reproduce https://develop.sentry.dev/sdk/features/#retrieve-last-event-id The method last_event_id does not exist anymore. I un...
X Description: How do you use Sentry? Sentry Saas (sentry.io) Version 2.1.0 Steps to Reproduce https://develop.sentry.dev/sdk/features/#retrieve-last-event-id The method last_event_id does not exist anymore. I un...
Opengraph URL: https://github.com/getsentry/sentry-python/issues/3049
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"No more last_event_id","articleBody":"### How do you use Sentry?\r\n\r\nSentry Saas (sentry.io)\r\n\r\n### Version\r\n\r\n2.1.0\r\n\r\n### Steps to Reproduce\r\n[https://develop.sentry.dev/sdk/features/#retrieve-last-event-id](https://develop.sentry.dev/sdk/features/#retrieve-last-event-id)\r\nThe method last_event_id does not exist anymore. I understand that's been deprecated but, how are we supposed to show the event_id to the user now?\r\nfrom sentry_sdk import last_event_id\r\n\r\n### Expected Result\r\n\r\nBe able to get the last event id from a non controlled exception and show it to the final user.\r\nIn django for example, the recommended way was this:\r\n\r\n```\r\nfrom sentry_sdk import last_event_id\r\n\r\nfrom django.shortcuts import render\r\n\r\n\r\ndef custom_handler500(request):\r\n context = {\r\n \"request\": request,\r\n \"title\": \"Error 500\",\r\n \"last_event_id\": last_event_id(),\r\n }\r\n template_name = \"500.html\"\r\n return render(request, template_name, context, status=500)\r\n```\r\n\r\n### Actual Result\r\n\r\n`ImportError: cannot import name 'last_event_id' from 'sentry_sdk' (/app/.venv/lib/python3.11/site-packages/sentry_sdk/__init__.py)`\r\n","author":{"url":"https://github.com/maltalk","@type":"Person","name":"maltalk"},"datePublished":"2024-05-06T15:35:18Z","url":"https://github.com/getsentry/sentry-python/issues/3049"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1307b0ba-50c5-20a5-613e-eca1afe0c9c5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C53E:1FCE:2BB1C9:3D142F:6B0436D5 |
| html-safe-nonce | 1d71f0603af2eb6d4368334caf93b4476ff9eef48ed22946fb45e27f89cb51c8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTNFOjFGQ0U6MkJCMUM5OjNEMTQyRjo2QjA0MzZENSIsInZpc2l0b3JfaWQiOiIzMTg2NTg3NjU3NzY5ODU4NzczIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 0fa9bf8cc8c92d7b903269d005691751d7d16357115256062a3f27e5a707af5e |
| hovercard-subject-tag | issue:2281169833 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-python/3049/issue_layout |
| twitter:image | https://opengraph.githubassets.com/77851bf389984c7b81cdbcc14fd4ef246353b66fea9c61f467851440fec85295/getsentry/sentry-python/issues/3049 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/77851bf389984c7b81cdbcc14fd4ef246353b66fea9c61f467851440fec85295/getsentry/sentry-python/issues/3049 |
| og:image:alt | How do you use Sentry? Sentry Saas (sentry.io) Version 2.1.0 Steps to Reproduce https://develop.sentry.dev/sdk/features/#retrieve-last-event-id The method last_event_id does not exist anymore. I un... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | maltalk |
| hostname | github.com |
| expected-hostname | github.com |
| None | b7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-python git https://github.com/getsentry/sentry-python.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 137814779 |
| octolytics-dimension-repository_nwo | getsentry/sentry-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 137814779 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c3dd496c3da6ea6b77e69c09279d2b81604654f1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width