Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Redis Profiler registration to ConditionalWeakTable #2148

Merged
merged 1 commit into from
Aug 4, 2023
Merged

Conversation

Mpdreamz
Copy link
Member

@Mpdreamz Mpdreamz commented Aug 4, 2023

This should ensure we don't leak our registrations if span/transaction's Ended
event never gets called but the spans/transaction themselves get GC'ed.

Note: I could not reproduce the memory leak as Ended was always called.

Fixes: #2145

This should ensure we don't leak our registrations if span/transaction's Ended
event never gets called but the spans/transaction themselves get GC'ed.

private readonly Lazy<IApmLogger> _logger;
private readonly Lazy<IApmAgent> _agent;
private static readonly Func<object, object> MessageFetcher;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a continuation of #2104 since we no longer set db.instance cc @stevejgordon

@Mpdreamz Mpdreamz merged commit c4b73fe into main Aug 4, 2023
18 checks passed
APM-Agents (OLD) automation moved this from In Progress to Done Aug 4, 2023
@Mpdreamz Mpdreamz deleted the fix/redis branch August 4, 2023 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

[Redis] Elastic.Apm.StackExchange.Redis High Memory Usage.
2 participants