Commit ac4184c
Enable AspNetCoreDiagnosticObserver for Azure Functions isolated mode
Previously, the AspNetCoreDiagnosticObserver was disabled for all Azure Functions
when FUNCTIONS_EXTENSION_VERSION and FUNCTIONS_WORKER_RUNTIME were present.
This was correct for in-process functions (to avoid AsyncLocal context issues
with separate Assembly Load Contexts), but incorrect for isolated functions.
In isolated mode, the worker process receives actual HTTP requests via gRPC
proxying for HTTP triggers. These requests should be instrumented by the
AspNetCore observer to properly capture HTTP spans.
Changes:
- Add logic to detect in-process vs isolated functions
- In-process: worker runtime is empty or "dotnet" (skip AspNetCore observer)
- Isolated: worker runtime is "dotnet-isolated" (enable AspNetCore observer)
- Update log message to clarify in-process vs isolated behavior
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent d83f7d1 commit ac4184c
1 file changed
+12
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
472 | | - | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
473 | 480 | | |
474 | 481 | | |
475 | 482 | | |
476 | 483 | | |
477 | | - | |
478 | | - | |
| 484 | + | |
479 | 485 | | |
480 | 486 | | |
481 | 487 | | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
482 | 491 | | |
483 | 492 | | |
484 | 493 | | |
| |||
0 commit comments