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

Increase diagnostics-id overhead in EventDataBatch #15193

Merged
Merged
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
6 changes: 5 additions & 1 deletion sdk/eventhub/Microsoft.Azure.EventHubs/src/EventDataBatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ namespace Microsoft.Azure.EventHubs
public class EventDataBatch : IDisposable
{
const int MaxSizeLimit = 4 * 1024 * 1024;
const int DiagnosticsIdOverhead = 64;

// System.Diagnostics.Activity.Id is 1024 bytes or shorter.
// However we will keep overhead at 128 bytes which should be enough for most scenarios.
// Any client in need of longer Ids should create batch with an appropriate mac-batch-size.
const int DiagnosticsIdOverhead = 128;

readonly List<EventData> eventDataList;
readonly long maxSize;
Expand Down