Skip to content

Commit acabb4c

Browse files
authored
[Event Hubs] Fix trigger data label (Azure#48517)
The focus of these changes is to fix a misspelling of "PartitionId" in the trigger input data passed to the function executor. This caused function logs and metrics reported by AppInsights and the portal to reflect the wrong label. To ensure that applications that rely on the misspelling are not impacted, a new member with the correct spelling was added.
1 parent 29dcfa1 commit acabb4c

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
### Bugs Fixed
1010

11+
- Fixed a misspelling of "PartitionId" in the trigger input data passed to the function executor. This caused function logs and metrics reported by AppInsights and the portal to reflect the wrong label. To ensure that applications that rely on the misspelling are not impacted, a new member with the correct spelling was added.
12+
1113
### Other Changes
1214

1315
## 6.3.5 (2024-08-01)

sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Triggers/EventHubTriggerInput.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the MIT License. See License.txt in the project root for license information.
33

4-
using Azure.Messaging.EventHubs;
54
using System.Collections.Generic;
65
using System.Globalization;
7-
using Azure.Messaging.EventHubs.Consumer;
6+
using Azure.Messaging.EventHubs;
87
using Azure.Messaging.EventHubs.Primitives;
98
using Microsoft.Azure.WebJobs.EventHubs.Processor;
109

@@ -83,11 +82,15 @@ public Dictionary<string, string> GetTriggerDetails(EventProcessorPartition cont
8382

8483
return new Dictionary<string, string>()
8584
{
86-
{ "PartionId", context.PartitionId },
85+
{ "PartitionId", context.PartitionId },
8786
{ "Offset", offset },
8887
{ "EnqueueTimeUtc", enqueueTimeUtc },
8988
{ "SequenceNumber", sequenceNumber },
90-
{ "Count", Events.Length.ToString(CultureInfo.InvariantCulture)}
89+
{ "Count", Events.Length.ToString(CultureInfo.InvariantCulture)},
90+
91+
// Preserve a misspelling that existed in the original code, as
92+
// there may be applications relying on this.
93+
{ "PartionId", context.PartitionId }
9194
};
9295
}
9396
}

0 commit comments

Comments
 (0)