René's URL Explorer Experiment


Title: Cleanup thread local context in ``ThreadLocalContextManager`` after e… by bretthoerner · Pull Request #422 · getsentry/sentry-java · GitHub

Open Graph Title: Cleanup thread local context in ``ThreadLocalContextManager`` after e… by bretthoerner · Pull Request #422 · getsentry/sentry-java

X Title: Cleanup thread local context in ``ThreadLocalContextManager`` after e… by bretthoerner · Pull Request #422 · getsentry/sentry-java

Description: …ach servlet request finishes. This is for #420. The issue was that threadlocals still held references to classes that were loaded with the old classloader -- and there was nothing to ever remove those old references. I did some research, and there's no way to remove threadlocals except from the thread that created them (which makes sense). So for now, the only place we do cleanup is in the SentryServletRequestListener. That should cover most bases, because the most common use of "make a new classloader and reload my entire app" is in application servers that are using servlets.

Open Graph Description: …ach servlet request finishes. This is for #420. The issue was that threadlocals still held references to classes that were loaded with the old classloader -- and there was nothing to ever remove ...

X Description: …ach servlet request finishes. This is for #420. The issue was that threadlocals still held references to classes that were loaded with the old classloader -- and there was nothing to ever remove ...

Opengraph URL: https://github.com/getsentry/sentry-java/pull/422

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.3

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:a1c084e5-3b07-fb25-0274-8ce384519a20
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDAFC:D0168:FAEC1:159CBD:6B04B199
html-safe-nonce8b5c7ebeb70187a105568f74cf697594f0b3b33f9c8676d9d8f6840d29cdc687
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQUZDOkQwMTY4OkZBRUMxOjE1OUNCRDo2QjA0QjE5OSIsInZpc2l0b3JfaWQiOiIxMjUwNTk5NzAxMzQ3MzQ4ODg5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacba9ee1f5942b1e769963c56bba94f82623f8502e530798b2eae217ff4371e41e
hovercard-subject-tagpull_request:126596805
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/getsentry/sentry-java/pull/422/files
twitter:imagehttps://avatars.githubusercontent.com/u/1752?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1752?s=400&v=4
og:image:alt…ach servlet request finishes. This is for #420. The issue was that threadlocals still held references to classes that were loaded with the old classloader -- and there was nothing to ever remove ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonef1d110ea058a0915c1d8aa3fc2069fa15801e128f591e5762525abe77490ecb1
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/getsentry/sentry-java git https://github.com/getsentry/sentry-java.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id3368190
octolytics-dimension-repository_nwogetsentry/sentry-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3368190
octolytics-dimension-repository_network_root_nwogetsentry/sentry-java
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseffa22a65e4c46d376940fe34b05e6a7e9c7fdb9b
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/getsentry/sentry-java/pull/422/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-java%2Fpull%2F422%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-java%2Fpull%2F422%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=getsentry%2Fsentry-java
Reloadhttps://github.com/getsentry/sentry-java/pull/422/files
Reloadhttps://github.com/getsentry/sentry-java/pull/422/files
Reloadhttps://github.com/getsentry/sentry-java/pull/422/files
getsentryhttps://github.com/getsentry
sentry-javahttps://github.com/getsentry/sentry-java
Codehttps://github.com/getsentry/sentry-java
Issues266 (266)https://github.com/getsentry/sentry-java/issues
Pull requests56 (56)https://github.com/getsentry/sentry-java/pulls
Discussionshttps://github.com/getsentry/sentry-java/discussions
Actionshttps://github.com/getsentry/sentry-java/actions
Projectshttps://github.com/getsentry/sentry-java/projects
Security and quality2 (2)https://github.com/getsentry/sentry-java/security
Insightshttps://github.com/getsentry/sentry-java/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fgetsentry%2Fsentry-java%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgetsentry%2Fsentry-java%2Fissues%2Fnew%2Fchoose
bretthoernerhttps://github.com/bretthoerner
masterhttps://github.com/getsentry/sentry-java/tree/master
clean-contexxthttps://github.com/getsentry/sentry-java/tree/clean-contexxt
Conversation 3 https://github.com/getsentry/sentry-java/pull/422
Commits 3 https://github.com/getsentry/sentry-java/pull/422/commits
Checks 0 https://github.com/getsentry/sentry-java/pull/422/checks
Files changed 11 https://github.com/getsentry/sentry-java/pull/422/files
Cleanup thread local context in ThreadLocalContextManager after e… https://github.com/getsentry/sentry-java/pull/422/files#top
Show all changes 3 commits https://github.com/getsentry/sentry-java/pull/422/files
01b5827 Cleanup thread local context in ``ThreadLocalContextManager`` after e… bretthoerner Jun 20, 2017 https://github.com/getsentry/sentry-java/pull/422/commits/01b582738404145d120969b6f1d6dcfbb91d49d0
78a76c0 Merge remote-tracking branch 'origin/master' into clean-contexxt bretthoerner Jun 21, 2017 https://github.com/getsentry/sentry-java/pull/422/commits/78a76c07b8dbbfcec8499c77ce8dcb6ab86d72d5
6791e26 Fix CHANGES bretthoerner Jun 21, 2017 https://github.com/getsentry/sentry-java/pull/422/commits/6791e268a60907e22f4f015a4607b82b4f2e5b48
Clear filters https://github.com/getsentry/sentry-java/pull/422/files
Please reload this pagehttps://github.com/getsentry/sentry-java/pull/422/files
Please reload this pagehttps://github.com/getsentry/sentry-java/pull/422/files
CHANGES https://github.com/getsentry/sentry-java/pull/422/files#diff-aac07aefec754086f5c344e2c233862f6a611c739b5647fd456c1b77d3577c79
Sentry.java https://github.com/getsentry/sentry-java/pull/422/files#diff-f5493ff9b36d0670e7c7f98f6a32b1a1577e94900bd74ff61dc5e89c1e3395c9
SentryClient.java https://github.com/getsentry/sentry-java/pull/422/files#diff-17fbf67756b6e3eaf3567515aadeedb437fe78fa9762063f1c67e8d6b7f77920
ContextManager.java https://github.com/getsentry/sentry-java/pull/422/files#diff-42169fd256a0078003a0741fec059935805c4585a08d2605cb8cceaa2b3c5642
SingletonContextManager.java https://github.com/getsentry/sentry-java/pull/422/files#diff-b7217181f8ee541312544ee5c1bd7ee7a426aa417f5535385068cf08ed8961e1
ThreadLocalContextManager.java https://github.com/getsentry/sentry-java/pull/422/files#diff-570ff6eb2c69ddf1236f0fbf0a6d44f5658fb16ec46c142c43cc06c005efb68a
SentryServletRequestListener.java https://github.com/getsentry/sentry-java/pull/422/files#diff-48e6233c6090c75f08e7990da1927eff37fc4e305fc06ce93658e8b78f6247ec
SentryClientTest.java https://github.com/getsentry/sentry-java/pull/422/files#diff-190c965f4fb17f07171f52dcfdbee09ed8d59ee46f1dffcdd9128297c7111bff
SentryTest.java https://github.com/getsentry/sentry-java/pull/422/files#diff-aa7a5cbee5395c51466b832bf900a319337353f0d1dabc3656b18c6fd4704f1e
BreadcrumbTest.java https://github.com/getsentry/sentry-java/pull/422/files#diff-17018a337dd9fdc7aef5b540c8018138dda010643d4931182e635e97c99a5a2f
UserTest.java https://github.com/getsentry/sentry-java/pull/422/files#diff-56b8e0c20aae73fa8f26da1d7f6fec70228ab632222afc4642fbfd1535b50cc7
CHANGEShttps://github.com/getsentry/sentry-java/pull/422/files#diff-aac07aefec754086f5c344e2c233862f6a611c739b5647fd456c1b77d3577c79
View file https://github.com/getsentry/sentry-java/blob/6791e268a60907e22f4f015a4607b82b4f2e5b48/CHANGES
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/getsentry/sentry-java/pull/422/{{ revealButtonHref }}
https://github.com/getsentry/sentry-java/pull/422/files#diff-aac07aefec754086f5c344e2c233862f6a611c739b5647fd456c1b77d3577c79
https://github.com/getsentry/sentry-java/pull/422/files#diff-aac07aefec754086f5c344e2c233862f6a611c739b5647fd456c1b77d3577c79
sentry/src/main/java/io/sentry/Sentry.javahttps://github.com/getsentry/sentry-java/pull/422/files#diff-f5493ff9b36d0670e7c7f98f6a32b1a1577e94900bd74ff61dc5e89c1e3395c9
View file https://github.com/getsentry/sentry-java/blob/6791e268a60907e22f4f015a4607b82b4f2e5b48/sentry/src/main/java/io/sentry/Sentry.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/getsentry/sentry-java/pull/422/{{ revealButtonHref }}
https://github.com/getsentry/sentry-java/pull/422/files#diff-f5493ff9b36d0670e7c7f98f6a32b1a1577e94900bd74ff61dc5e89c1e3395c9
https://github.com/getsentry/sentry-java/pull/422/files#diff-f5493ff9b36d0670e7c7f98f6a32b1a1577e94900bd74ff61dc5e89c1e3395c9
sentry/src/main/java/io/sentry/SentryClient.javahttps://github.com/getsentry/sentry-java/pull/422/files#diff-17fbf67756b6e3eaf3567515aadeedb437fe78fa9762063f1c67e8d6b7f77920
View file https://github.com/getsentry/sentry-java/blob/6791e268a60907e22f4f015a4607b82b4f2e5b48/sentry/src/main/java/io/sentry/SentryClient.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/getsentry/sentry-java/pull/422/{{ revealButtonHref }}
https://github.com/getsentry/sentry-java/pull/422/files#diff-17fbf67756b6e3eaf3567515aadeedb437fe78fa9762063f1c67e8d6b7f77920
https://github.com/getsentry/sentry-java/pull/422/files#diff-17fbf67756b6e3eaf3567515aadeedb437fe78fa9762063f1c67e8d6b7f77920
sentry/src/main/java/io/sentry/context/ContextManager.javahttps://github.com/getsentry/sentry-java/pull/422/files#diff-42169fd256a0078003a0741fec059935805c4585a08d2605cb8cceaa2b3c5642
View file https://github.com/getsentry/sentry-java/blob/6791e268a60907e22f4f015a4607b82b4f2e5b48/sentry/src/main/java/io/sentry/context/ContextManager.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/getsentry/sentry-java/pull/422/{{ revealButtonHref }}
https://github.com/getsentry/sentry-java/pull/422/files#diff-42169fd256a0078003a0741fec059935805c4585a08d2605cb8cceaa2b3c5642
sentry/src/main/java/io/sentry/context/SingletonContextManager.javahttps://github.com/getsentry/sentry-java/pull/422/files#diff-b7217181f8ee541312544ee5c1bd7ee7a426aa417f5535385068cf08ed8961e1
View file https://github.com/getsentry/sentry-java/blob/6791e268a60907e22f4f015a4607b82b4f2e5b48/sentry/src/main/java/io/sentry/context/SingletonContextManager.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/getsentry/sentry-java/pull/422/{{ revealButtonHref }}
https://github.com/getsentry/sentry-java/pull/422/files#diff-b7217181f8ee541312544ee5c1bd7ee7a426aa417f5535385068cf08ed8961e1
sentry/src/main/java/io/sentry/context/ThreadLocalContextManager.javahttps://github.com/getsentry/sentry-java/pull/422/files#diff-570ff6eb2c69ddf1236f0fbf0a6d44f5658fb16ec46c142c43cc06c005efb68a
View file https://github.com/getsentry/sentry-java/blob/6791e268a60907e22f4f015a4607b82b4f2e5b48/sentry/src/main/java/io/sentry/context/ThreadLocalContextManager.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/getsentry/sentry-java/pull/422/{{ revealButtonHref }}
https://github.com/getsentry/sentry-java/pull/422/files#diff-570ff6eb2c69ddf1236f0fbf0a6d44f5658fb16ec46c142c43cc06c005efb68a
bretthoernerhttps://github.com/bretthoerner
Jun 20, 2017https://github.com/getsentry/sentry-java/pull/422/files#r123054358
Please reload this pagehttps://github.com/getsentry/sentry-java/pull/422/files
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/getsentry/sentry-java/pull/422/files
sentry/src/main/java/io/sentry/servlet/SentryServletRequestListener.javahttps://github.com/getsentry/sentry-java/pull/422/files#diff-48e6233c6090c75f08e7990da1927eff37fc4e305fc06ce93658e8b78f6247ec
View file https://github.com/getsentry/sentry-java/blob/6791e268a60907e22f4f015a4607b82b4f2e5b48/sentry/src/main/java/io/sentry/servlet/SentryServletRequestListener.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/getsentry/sentry-java/pull/422/{{ revealButtonHref }}
https://github.com/getsentry/sentry-java/pull/422/files#diff-48e6233c6090c75f08e7990da1927eff37fc4e305fc06ce93658e8b78f6247ec
https://github.com/getsentry/sentry-java/pull/422/files#diff-48e6233c6090c75f08e7990da1927eff37fc4e305fc06ce93658e8b78f6247ec
sentry/src/test/java/io/sentry/SentryClientTest.javahttps://github.com/getsentry/sentry-java/pull/422/files#diff-190c965f4fb17f07171f52dcfdbee09ed8d59ee46f1dffcdd9128297c7111bff
View file https://github.com/getsentry/sentry-java/blob/6791e268a60907e22f4f015a4607b82b4f2e5b48/sentry/src/test/java/io/sentry/SentryClientTest.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/getsentry/sentry-java/pull/422/{{ revealButtonHref }}
https://github.com/getsentry/sentry-java/pull/422/files#diff-190c965f4fb17f07171f52dcfdbee09ed8d59ee46f1dffcdd9128297c7111bff
https://github.com/getsentry/sentry-java/pull/422/files#diff-190c965f4fb17f07171f52dcfdbee09ed8d59ee46f1dffcdd9128297c7111bff
sentry/src/test/java/io/sentry/SentryTest.javahttps://github.com/getsentry/sentry-java/pull/422/files#diff-aa7a5cbee5395c51466b832bf900a319337353f0d1dabc3656b18c6fd4704f1e
View file https://github.com/getsentry/sentry-java/blob/6791e268a60907e22f4f015a4607b82b4f2e5b48/sentry/src/test/java/io/sentry/SentryTest.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/getsentry/sentry-java/pull/422/{{ revealButtonHref }}
https://github.com/getsentry/sentry-java/pull/422/files#diff-aa7a5cbee5395c51466b832bf900a319337353f0d1dabc3656b18c6fd4704f1e
https://github.com/getsentry/sentry-java/pull/422/files#diff-aa7a5cbee5395c51466b832bf900a319337353f0d1dabc3656b18c6fd4704f1e
sentry/src/test/java/io/sentry/event/BreadcrumbTest.javahttps://github.com/getsentry/sentry-java/pull/422/files#diff-17018a337dd9fdc7aef5b540c8018138dda010643d4931182e635e97c99a5a2f
View file https://github.com/getsentry/sentry-java/blob/6791e268a60907e22f4f015a4607b82b4f2e5b48/sentry/src/test/java/io/sentry/event/BreadcrumbTest.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/getsentry/sentry-java/pull/422/{{ revealButtonHref }}
https://github.com/getsentry/sentry-java/pull/422/files#diff-17018a337dd9fdc7aef5b540c8018138dda010643d4931182e635e97c99a5a2f
https://github.com/getsentry/sentry-java/pull/422/files#diff-17018a337dd9fdc7aef5b540c8018138dda010643d4931182e635e97c99a5a2f
sentry/src/test/java/io/sentry/event/UserTest.javahttps://github.com/getsentry/sentry-java/pull/422/files#diff-56b8e0c20aae73fa8f26da1d7f6fec70228ab632222afc4642fbfd1535b50cc7
View file https://github.com/getsentry/sentry-java/blob/6791e268a60907e22f4f015a4607b82b4f2e5b48/sentry/src/test/java/io/sentry/event/UserTest.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/getsentry/sentry-java/pull/422/{{ revealButtonHref }}
https://github.com/getsentry/sentry-java/pull/422/files#diff-56b8e0c20aae73fa8f26da1d7f6fec70228ab632222afc4642fbfd1535b50cc7
https://github.com/getsentry/sentry-java/pull/422/files#diff-56b8e0c20aae73fa8f26da1d7f6fec70228ab632222afc4642fbfd1535b50cc7
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.