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

fix: decrease runtime circular buffer for diagnostics client #3491

Merged
merged 4 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
### Fixes

- Race condition in `SentryMessageHandler` ([#3477](https://github.com/getsentry/sentry-dotnet/pull/3477))
- Decrease runtime diagnostics circular buffer when profiling, reducing memory usage ([#3491](https://github.com/getsentry/sentry-dotnet/pull/3491))

## 4.9.0

Expand Down
5 changes: 3 additions & 2 deletions src/Sentry.Profiling/SampleProfilerSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ private SampleProfilerSession(SentryStopwatch stopwatch, EventPipeSession sessio
};

// Exposed only for benchmarks.
// The size of the runtime's buffer for collecting events in MB, same as the current default in StartEventPipeSession().
internal static int CircularBufferMB = 256;
// The size of the runtime's buffer for collecting events. The docs are sparse but it seems like we don't
// need a large buffer if we're connecting righ away. Leaving it too large increases app memory usage.
internal static int CircularBufferMB = 16;

public SampleProfilerTraceEventParser SampleEventParser => _sampleEventParser;

Expand Down
Loading