Skip to content

Commit 16dfdd1

Browse files
Increase diagnostics-id overhead in EventDataBatch (#15193)
1 parent d364650 commit 16dfdd1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sdk/eventhub/Microsoft.Azure.EventHubs/src/EventDataBatch.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ namespace Microsoft.Azure.EventHubs
1414
public class EventDataBatch : IDisposable
1515
{
1616
const int MaxSizeLimit = 4 * 1024 * 1024;
17-
const int DiagnosticsIdOverhead = 64;
17+
18+
// System.Diagnostics.Activity.Id is 1024 bytes or shorter.
19+
// However we will keep overhead at 128 bytes which should be enough for most scenarios.
20+
// Any client in need of longer Ids should create batch with an appropriate mac-batch-size.
21+
const int DiagnosticsIdOverhead = 128;
1822

1923
readonly List<EventData> eventDataList;
2024
readonly long maxSize;

0 commit comments

Comments
 (0)