Repository navigation
Fix Service Bus session trace propagation in OpenTelemetry - #11946
Merged
Rohit Ranjan (RohitRanjanMS) merged 4 commits intoSep 15, 2026
Merged
Rohit Ranjan (RohitRanjanMS) merged 4 commits into
Rohit Ranjan (RohitRanjanMS) merged 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses a distributed tracing gap in Functions Host OpenTelemetry integration by ensuring session-enabled Service Bus triggers are instrumented via the correct ActivitySource, preserving W3C trace context.
Changes:
- Added
Azure.Messaging.ServiceBus.ServiceBusSessionProcessorto the host’s OpenTelemetryActivitySourceallowlist. - Introduced a constant for the Service Bus session processor
ActivitySourcename. - Added a unit test validating that an activity can be started for the session processor source (i.e., a listener is registered).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/WebJobs.Script.Tests/Diagnostics/OpenTelemetry/OpenTelemetryConfigurationExtensionsTests.cs | Adds coverage to validate the host listens to the Service Bus session processor ActivitySource. |
| src/WebJobs.Script/Diagnostics/OpenTelemetry/OpenTelemetryConstants.cs | Introduces a constant for the Service Bus session processor ActivitySource name. |
| src/WebJobs.Script/Diagnostics/OpenTelemetry/OpenTelemetryConfigurationExtensions.cs | Subscribes to the Service Bus session processor ActivitySource during tracing configuration. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Jacob Viau (jviau)
approved these changes
Aug 27, 2026
sarah (satvu)
approved these changes
Sep 11, 2026
Rohit Ranjan (RohitRanjanMS)
force-pushed
the
rohitranjanms-fix-service-bus-session-tracing
branch
from
September 14, 2026 07:17
a09f7c7 to
bdc32e2
Compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e01f6e03-4761-4eeb-9d24-e2522eb0f446
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e01f6e03-4761-4eeb-9d24-e2522eb0f446
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e01f6e03-4761-4eeb-9d24-e2522eb0f446
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e01f6e03-4761-4eeb-9d24-e2522eb0f446
Rohit Ranjan (RohitRanjanMS)
force-pushed
the
rohitranjanms-fix-service-bus-session-tracing
branch
from
September 14, 2026 18:33
bdc32e2 to
71557c0
Compare
sarah (satvu)
approved these changes
Sep 14, 2026
Rohit Ranjan (RohitRanjanMS)
deleted the
rohitranjanms-fix-service-bus-session-tracing
branch
September 15, 2026 05:37
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue describing the changes in this PR
Resolves #11734
Pull request checklist
IMPORTANT: Currently, changes must be backported to the
in-procbranch to be included in Core Tools and non-Flex deployments.in-procbranch is not requiredrelease_notes.mdAdditional information
Registers the
Azure.Messaging.ServiceBus.ServiceBusSessionProcessoractivity source so session-enabled Service Bus triggers preserve W3C trace context in OpenTelemetry mode.Validated with a private site extension against a session-enabled Service Bus trigger: the stock host omitted the session processor request and broke the producer trace, while the patched host emitted
ServiceBusSessionProcessor.ProcessSessionMessagewith the producer operation ID.