You need detailed troubleshooting data from APIM into Log Analytics while controlling cost. Requirements: send gateway logs and request traces to a Log Analytics workspace; sample at approximately 50% of traffic; and temporarily include request/response bodies to diagnose issues. What should you configure? (Choose two)
Choose an answer
Tap an option to check your answer.
Correct answer: Create a diagnostic setting on the APIM instance that streams GatewayLogs and GatewayRequests to a Log Analytics workspace., In APIM Azure Monitor settings, set the sampling rate to 50% and enable request/response body logging..
Why this is the answer
To send detailed troubleshooting data to Log Analytics, you must first configure a diagnostic setting on the APIM instance. This setting allows you to select specific log categories, such as GatewayLogs and GatewayRequests, and stream them to a chosen Log Analytics workspace. This fulfills the requirement to send gateway logs and request traces. Next, within the APIM Azure Monitor settings, you can control the sampling rate to manage costs and set it to approximately 50%, as required. This section also allows you to temporarily enable request/response body logging, which is crucial for diagnosing issues by providing full message content. Application Insights Profiler is for code-level performance analysis, not APIM gateway logs. Exporting to Event Hub and then connecting to Log Analytics is an unnecessary indirection when direct streaming via diagnostic settings is available and preferred for this scenario.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed