Ops must follow one resident request across the API gateway, an Azure Function, and Cosmos DB. What should they implement?
Select an answer to reveal the explanation.
Short Explanation
You can think of distributed tracing as the colored string tying the gateway, Function, and Cosmos beads on one necklace, so you follow the resident’s request end to end. OpenTelemetry carries that shared trace across the hops, helping you see where a delay or failure occurs.
Full Explanation
Ops following one resident request across an API gateway, an Azure Function, and Cosmos DB need OpenTelemetry distributed tracing so a single trace ties those hops together. Each service creates spans, propagates W3C trace context (trace ID and parent span ID) on inbound and outbound calls, and exports the data to Azure Monitor or Application Insights. Analysts can then open one resident transaction and see gateway latency, Function execution, and Cosmos dependency calls as one correlated timeline—essential for municipal 311-style troubleshooting when the failure may not be in the first hop. Collecting verbose plain-text logs without shared correlation IDs fails because keywords and timestamps are weak joins across services, especially with clock skew and high volume. Disabling all telemetry to reduce noise during peak 311 hours removes observability when it is most needed, since cross-service failures can appear during peak usage. Tracing only the browser UI misses back-end Function and Cosmos hops, where the cause of a resident-visible delay may lie. Exam caveat: distributed tracing requires consistent context propagation and an exporter path; spans that never leave the process do not help Azure Monitor investigations. Sampling may reduce volume, but shared trace IDs remain central. Do not confuse OpenTelemetry traces with platform metrics alone. Practical check: send a test resident request with a known operation ID or trace ID, confirm gateway, Function, and Cosmos dependency telemetry share it in Application Insights, and verify an induced Cosmos failure appears on the same end-to-end transaction view.