-
Notifications
You must be signed in to change notification settings - Fork 151
Fix InvalidOperationException in Baggage handling in Azure Functions
#7810
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
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (7810) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-time benchmarks measure the whole time it takes to execute a program, and are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are highlighted in **red**. The following thresholds were used for comparing the execution times:
Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard. Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph). Duration chartsFakeDbCommand (.NET Framework 4.8)gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7810) - mean (77ms) : 69, 85
master - mean (76ms) : 71, 81
section Bailout
This PR (7810) - mean (83ms) : 75, 92
master - mean (79ms) : 76, 82
section CallTarget+Inlining+NGEN
This PR (7810) - mean (1,108ms) : 1035, 1181
master - mean (1,124ms) : 1044, 1203
FakeDbCommand (.NET Core 3.1)gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7810) - mean (118ms) : 109, 126
master - mean (117ms) : 110, 123
section Bailout
This PR (7810) - mean (119ms) : 113, 125
master - mean (119ms) : 112, 127
section CallTarget+Inlining+NGEN
This PR (7810) - mean (796ms) : 751, 841
master - mean (801ms) : 754, 847
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7810) - mean (105ms) : 100, 111
master - mean (104ms) : 98, 110
section Bailout
This PR (7810) - mean (107ms) : 99, 115
master - mean (105ms) : 100, 111
section CallTarget+Inlining+NGEN
This PR (7810) - mean (749ms) : 708, 791
master - mean (750ms) : 717, 783
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7810) - mean (104ms) : 96, 112
master - mean (104ms) : 96, 111
section Bailout
This PR (7810) - mean (105ms) : 98, 112
master - mean (103ms) : 98, 108
section CallTarget+Inlining+NGEN
This PR (7810) - mean (709ms) : 676, 741
master - mean (716ms) : 688, 744
HttpMessageHandler (.NET Framework 4.8)gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7810) - mean (198ms) : 189, 207
master - mean (193ms) : 189, 196
section Bailout
This PR (7810) - mean (198ms) : 194, 202
master - mean (195ms) : 193, 197
section CallTarget+Inlining+NGEN
This PR (7810) - mean (1,168ms) : 1110, 1226
master - mean (1,166ms) : 1106, 1227
HttpMessageHandler (.NET Core 3.1)gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7810) - mean (277ms) : 271, 283
master - mean (277ms) : 271, 282
section Bailout
This PR (7810) - mean (279ms) : 273, 286
master - mean (277ms) : 271, 283
section CallTarget+Inlining+NGEN
This PR (7810) - mean (948ms) : 904, 993
master - mean (942ms) : 895, 988
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7810) - mean (269ms) : 265, 274
master - mean (270ms) : 264, 276
section Bailout
This PR (7810) - mean (270ms) : 267, 273
master - mean (269ms) : 264, 274
section CallTarget+Inlining+NGEN
This PR (7810) - mean (931ms) : 878, 984
master - mean (930ms) : 877, 983
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7810) - mean (269ms) : 263, 275
master - mean (268ms) : 263, 272
section Bailout
This PR (7810) - mean (268ms) : 265, 271
master - mean (268ms) : 264, 272
section CallTarget+Inlining+NGEN
This PR (7810) - mean (852ms) : 824, 881
master - mean (855ms) : 829, 880
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
## Summary of changes Respect baggage in Azure messaging instrumentations. Related to #7810 ## Reason for change Baggage was not being extracted from headers ## Implementation details ## Test coverage Unit test `AzureFunctionsCommon.ExtractPropagatedContextFromMessaging` with baggage merging. `CreateIsolatedFunctionScope` would have been more complex to test. ## Other details <!-- Fixes #{issue} --> <!--⚠️ Note: Where possible, please obtain 2 approvals prior to merging. Unless CODEOWNERS specifies otherwise, for external teams it is typically best to have one review from a team member, and one review from apm-dotnet. Trivial changes do not require 2 reviews. MergeQueue is NOT enabled in this repository. If you have write access to the repo, the PR has 1-2 approvals (see above), and all of the required checks have passed, you can use the Squash and Merge button to merge the PR. If you don't have write access, or you need help, reach out in the #apm-dotnet channel in Slack. -->
Summary of changes
Fixes
InvalidOperationExceptionin baggage handlingReason for change
#7620 added support for event hubs to Azure Functions, but we've subsequently seen errors related to baggage:
We can reproduce this if you pass the same baggage instance to itself in
MergeInto, so we guard against that here.Implementation details
Check that you're not merging into yourself
Test coverage
Added a unit test, confirmed it repros, then fixed it