Skip to content

SamplingTransactionProfilerFactory.Dispose disposes the Task, not the SampleProfilerSession (resource leak) - #5480

Closed
tsushanth wants to merge 1 commit into
getsentry:mainfrom
tsushanth:fix/SamplingTransactionProfilerFactory-Dispo-1786210954
Closed

SamplingTransactionProfilerFactory.Dispose disposes the Task, not the SampleProfilerSession (resource leak)#5480
tsushanth wants to merge 1 commit into
getsentry:mainfrom
tsushanth:fix/SamplingTransactionProfilerFactory-Dispo-1786210954

Conversation

@tsushanth

Copy link
Copy Markdown
Contributor

Fixed Dispose() to call task.Result.Dispose() on the SampleProfilerSession instead of disposing the Task itself

Found via automated repo scanning, fix written and reviewed before opening.

@github-actions github-actions Bot added the risk: low PR risk score: low label Aug 12, 2026
@jamescrosswell

Copy link
Copy Markdown
Collaborator

@tsushanth I think this is a duplicate of:

#5470 also includes some other changes that make this fix reachable, so I'll close this PR.

Worth noting that this fix is mostly cosmetic - this 'leak' only ever happens when shutting down the Sentry SDK (typically when finishing the process) so, in practice, will impact almost nobody.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants