forked from Azure/azure-sdk-for-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[event-hubs] prevent empty span creation when tracing is disabled (Az…
…ure#17129) Fixes Azure#14063 This update improves the event instrumentation logic so that spans are only created if tracing is enabled. This fixes the issue where adding events to an EventDataBatch led to empty spans being created when tracing was not enabled. The `instrumentEventData` function is similar to the `instrumentMessage` function in service bus. The main difference is that in event hubs we need to check if the event being instrumented is an AmqpAnnotatedMessage or an EventData since properties are stored in a different field (properties vs applicationProperties) depending which is used. In service bus, the ServiceBusMessage uses applicationProperties, so no distinction versus AmqpAnnotatedMessage is needed there. /cc @maorleger
- Loading branch information
Showing
5 changed files
with
93 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters