Skip to content

Commit

Permalink
Increase diagnostics-id overhead in EventDataBatch (#15193)
Browse files Browse the repository at this point in the history
  • Loading branch information
serkantkaraca authored Sep 18, 2020
1 parent d364650 commit 16dfdd1
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit 16dfdd1

Please sign in to comment.