-
Notifications
You must be signed in to change notification settings - Fork 469
Setting current activity status. #11313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a telemetry issue where Azure Function Apps with Service Bus triggers/outputs were incorrectly reporting failed invocations as successful. The fix ensures that Activity status is properly set to Error when function invocations fail.
- Moves activity status setting from the logging layer to the invocation response layer
- Adds proper execution context restoration to maintain AsyncLocal state flow
- Includes comprehensive test coverage for the failure scenario
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/WebJobs.Script.Grpc/Channel/GrpcWorkerChannel.cs | Implements the core fix by adding SetCurrentActivityStatus method and calling it during failed invocations |
test/WebJobs.Script.Tests/Workers/Rpc/GrpcWorkerChannelTests.cs | Adds test coverage to verify activity status is set to Error on invocation failures |
release_notes.md | Documents the change in release notes |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
test/WebJobs.Script.Tests/Workers/Rpc/GrpcWorkerChannelTests.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a couple small comments
Issue describing the changes in this PR
Azure Function Apps when using the Service Bus trigger or output binding. In certain scenarios, if the function execution encounters an error, the associated request is still reported as successful in telemetry and monitoring systems. As a result, failures may be hidden from logs, dashboards, or alerting pipelines, leading to inaccurate success rates and potentially masking operational issues.
resolves #11314
Pull request checklist
IMPORTANT: Currently, changes must be backported to the
in-proc
branch to be included in Core Tools and non-Flex deployments.in-proc
branch is not requiredrelease_notes.md
Additional information
Additional PR information