Repository navigation
[APMSVLS-442] Adding azure frontdoor support - #8861
Conversation
BenchmarksBenchmark execution time: 2026-11-03 17:20:40 Comparing candidate commit 65f691a in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 72 metrics, 0 unstable metrics, 4 known flaky benchmarks, 121 flaky benchmarks without significant changes.
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8861) and master. ✅ No regressions detected |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 025d9ec808
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@DataDog review |
There was a problem hiding this comment.
Preserving an inferred proxy root also suppresses Azure Functions enrichment when the application reuses an active ASP.NET Core request scope. That request span loses function identity and trigger metadata.
🤖 Bits Code Review · Commit fd9a111
Snapshots difference summaryThe following differences have been observed in committed snapshots. It is meant to help the reviewer. 1 occurrences of : - Type: web,
+ Type: serverless,
[...]
+ aas.function.binding: Microsoft.Azure.WebJobs.Host.Executors.BindingSource,
+ aas.function.name: SimpleHttpTrigger,
+ aas.function.trigger: Http,
[...]
- component: aspnet_core,
+ component: AzureFunctions,
|
There was a problem hiding this comment.
The new Front Door integration test references a missing Verify baseline, causing the Windows Azure Functions suite to fail when snapshot verification is reached.
🤖 Bits Code Review · Commit 06ab7ed
LLM ValidationLLM Validation Gate — dotnet-tracer-agent✅ PASS
AnalysisChanged instruction file(s): Ran 5 of 6 selected case(s) — skipped 1 not tied to the changed file(s): No safety or blocking-case regressions across 5 of 6 selected case(s). Overall pairwise win-rate 50% [49%–51%], quality -0.1 — see the verdict above for whether that clears the noise band. Results
Cases
Per-dimension scores, token usage, latency, and estimated cost are in the CI job logs. |
dc86e9f to
e5127b7
Compare
|
@DataDog review |
There was a problem hiding this comment.
More details
Front Door spans intentionally begin at application header extraction when no timestamp is supplied, so they do not measure time spent inside Front Door.
🤖 Bits Code Review · Commit 65f691a
bouwkast
left a comment
There was a problem hiding this comment.
LGTM
Only files owned: docs/development/InferredProxyServices.md and AGENTS.md
Summary of changes
This PR implements Azure FrontDoor. This is an upstream proxy service that Azure offers.
Azure Front Door
Azure Front Door is a edge computing CDN proxy that provides load balancing and regional routing to azure web apps and containers. Customers use this ensure their application has a single entry point across multiple regions.
One special case is that azure front door lacks the ability to insert timestamps in the headers. This may change in the future but due to this I modified the process to add a timespan at header detection which means that the accuracy of the timeline decreases but we still get a usable span and the proxy is represented. If this does change and the ability to insert timestamps does get implemented on Azure's side the code is thoughtful enough to not overwrite an existing timestamp header and making it less of an urgent change to remove the code I am introducing.
Reason for change
This is a proxy service from Azure. It would be great to provide observability coverage for customers to see in their traces.
Implementation details
I added Azure Front Door support to the inferred proxy span pipeline, following the same pattern already established for Azure API Management and AWS API Gateway.
The core of the work is two new classes: AzureFrontDoorExtractor and AzureFrontDoorSpanFactory. The extractor reads the standard inferred proxy headers (start time, domain, HTTP method, path, region) from the incoming request and returns an InferredProxyData struct. Unlike APIM and API Gateway, Azure Front Door does not inject a timestamp header, so if one isn't present the extractor synthesizes a start time from the current time — but if a start time header is present it will be used instead. The span factory takes that data and creates a web-type span with operation name azure.frontdoor, setting resource name, HTTP tags, region, and using the domain name as the service name.
I wired these into InferredProxySpanHelper so that when the x-dd-proxy header value is azure-fd, the coordinator is initialized with the Front Door extractor and factory and produces the inferred proxy scope.
I also updated AzureFunctionsCommon to recognize azure.frontdoor as a proxy operation name — same as it already does for azure.apim — so that Azure Functions doesn't overwrite the inferred proxy span as the root.
Finally, I added the constant AzureFrontDoorName = "azure.frontdoor" to AzureFunctionsConstants, and wrote unit tests for both the extractor and the span factory covering the happy path, missing optional headers, and invalid/missing start time.
Test coverage
AzureFrontDoorExtractorTests has 7 tests total (4 via [Theory], 3 [Fact]):
I verify that when all headers are present and valid, TryExtract returns true and correctly populates ProxyName, StartTime, HttpMethod, Path, Stage, and Region.
I verify that when only the required start time header is present (optional headers removed), extraction still succeeds and the optional fields come back null.
I cover 4 invalid start time cases (null, empty string, non-numeric, and an overflowing value) via a theory — all should return false with a default InferredProxyData.
I verify that a completely missing start time header also returns false.
AzureFrontDoorSpanFactoryTests has 1 test:
I verify that CreateSpan produces a span with the correct operation name (azure.frontdoor), resource name (GET /api/v1/users), span type (web), start time, and all expected tags (http.method, component, http.url, http.route).
Other details