Tüm alıştırma soruları
972 soru
You are troubleshooting a high-volume Azure App Service application. You need to write an optimized Kusto Query Language (KQL) query in Application Insights to analyze dependencies associated with slow requests. Specifically, you want to identify the percentile duration of dependency calls that occurred during requests that took longer than () within the last .
Which KQL query should you use to retrieve this data with the best query performance?
let slowRequests = requests
| where timestamp > timeLimit and duration > 3000
| project operation_Id;
dependencies
| where timestamp > timeLimit
| join kind=inner slowRequests on operation_Id
| summarize p95 = percentile(duration, 95) by name
| order by p95 desc
| where duration > 3000
| project operation_Id;
dependencies
| where timestamp > ago(24h)
| join kind=inner slowRequests on operation_Id
| summarize p95 = percentile(duration, 95) by name
| order by p95 desc
let slowRequests = requests
| where timestamp > timeLimit and duration > 3000
| project operation_Id;
dependencies
| join kind=inner slowRequests on operation_Id
| summarize p95 = percentile(duration, 95) by name
| order by p95 desc
| join kind=inner requests on operation_Id
| where timestamp > ago(24h) and requests.duration > 3000
| summarize p95 = percentile(duration, 95) by name
| order by p95 desc
A developer is investigating a performance bottleneck in an Azure Function App. They want to retrieve all dependency calls from the last 6 hours that took longer than the 90th percentile of all dependency durations during that same period. Complete the Kusto Query Language (KQL) query to retrieve these slow dependency calls by filling in the blanks.
Aşağıdaki boşlukları doldurun
let threshold = toscalar(
dependencies
| where timestamp > ago(6h)
| summarize (duration, 90)
);
dependencies
| where timestamp > ago(6h)
| where duration >
You are designing a secure, event-driven solution in Azure. You have an Event Grid custom topic and a Webhook endpoint. You must route events from the custom topic to the Webhook endpoint.
To ensure reliability and security, you must meet the following requirements:
- If event delivery to the Webhook fails, events must be dead-lettered to an Azure Storage blob container.
- Event Grid must write the dead-letter events to the container using a system-assigned managed identity.
- The subscription must be successfully validated.
Which four actions should you perform in sequence to configure the solution? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.
Öğeleri doğru sıraya koymak için sürükleyin
You are monitoring a high-volume Azure App Service web application using Azure Application Insights. You need to write an optimized Kusto Query Language (KQL) query to count the number of slow external HTTP dependency calls.
The query must meet the following requirements:
1. Dynamically calculate the 90th percentile duration of all HTTP dependencies over the last 24 hours and use this as a threshold.
2. Filter the `dependencies` table to include only HTTP calls whose duration exceeds this threshold.
3. Join the filtered dependencies with the `requests` table to associate them with their parent operations.
4. Group the results by the operation name (from the `requests` table) and the dependency target (from the `dependencies` table) to display the total count of slow dependency calls.
5. Apply time-range filters as early as possible to minimize the volume of data scanned and prevent query performance issues.
Complete the KQL query below by filling in the blanks with the correct KQL functions, table fields, or join operators.
Aşağıdaki boşlukları doldurun
let threshold = (
dependencies
| where timestamp >= start
| where type == "Http"
| summarize percentile(duration, 90)
);
dependencies
| where >= start
| where type == "Http" and duration > threshold
| join kind= (
requests
| where >= start
) on operation_Id
| summarize SlowCount = count() by RequestName = name, Target = target
An organization is implementing a multi-tenant event-driven architecture using an Azure Event Grid Event Domain named `marketing-domain`. Each tenant is assigned a unique topic within the domain (for example, `marketing-domain/topics/tenant-alpha`) to isolate their marketing campaign events. You must grant a service principal representing `tenant-alpha` the minimum permissions required to create and manage their own event subscriptions within their topic, while strictly preventing them from managing or viewing subscriptions for other tenants' topics. Which configuration should you implement?
An organization requires developer portal authentication for an Azure API Management (APIM) instance using Microsoft Entra ID. To implement this, you must configure the trust relationship between Microsoft Entra ID and the APIM developer portal. What is the correct sequence of steps to configure this identity provider and make it available to portal users?
Öğeleri doğru sıraya koymak için sürükleyin
You are configuring an Azure API Management (APIM) instance to route requests to a backend microservice deployed on an Azure Virtual Machine. The backend microservice uses a self-signed SSL/TLS certificate for secure communication. When testing the API in APIM, you receive a HTTP 500 Bad Gateway error because the APIM instance cannot validate the trust chain of the self-signed certificate. You need to configure APIM to successfully communicate with the backend service. Which of the following actions should you perform to resolve this issue?
An organization is monitoring an API gateway using Azure Application Insights. You need to write an optimized Kusto Query Language (KQL) query that calculates the success rate (percentage of successful requests) of HTTP requests received in the last 24 hours.
Which two of the following KQL queries will achieve this requirement efficiently?
Geçerli olan tümünü seçin
| where timestamp > ago(24h)
| summarize SuccessRate = countif(success == true) * 100.0 / count()
| summarize SuccessRate = countif(success == true) * 100.0 / count()
| where timestamp > ago(24h)
| where timestamp > ago(24h)
| summarize SuccessCount = countif(success), TotalCount = count()
| project SuccessRate = (todouble(SuccessCount) * 100.0) / TotalCount
| summarize SuccessCount = countif(success == true), TotalCount = count()
| project SuccessRate = (todouble(SuccessCount) * 100.0) / TotalCount
An organization runs a C# (.NET) microservice to ingest IoT telemetry. The service utilizes the `Azure.Messaging.EventHubs.Processor` library and deploys multiple instances of `EventProcessorClient` that share a common Azure Blob Storage container as a checkpoint store. During peak loads, you observe partition thrashing where consumer instances continuously claim and release partition ownership from each other, resulting in excessive duplicate processing. Upon reviewing the client configuration, you find the following setup:
csharp
var options = new EventProcessorClientOptions
{
LoadBalancingUpdateInterval = TimeSpan.FromSeconds(15),
PartitionOwnershipExpirationInterval = TimeSpan.FromSeconds(10)
};
Which of the following actions should you perform to resolve the partition thrashing?
You are developing a solution in Azure API Management (APIM). The API must allow cross-origin requests from a web client hosted at `https://portal.contoso.com`. You configure JSON Web Token (JWT) validation and response caching. During testing, the web client fails to access the API, throwing a CORS error in the browser console. The APIM gateway logs show that preflight `OPTIONS` requests are failing with an HTTP `401 Unauthorized` status code. You review the following policy configuration:
xml
<policies>
<inbound>
<base />
<validate-jwt header-name="Authorization" failed-validation-httpcode="401" failed-validation-error-message="Unauthorized">
<openid-config url="https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration" />
<required-claims>
<claim name="aud">
<value>api://portal-backend</value>
</claim>
</required-claims>
</validate-jwt>
<cors allow-credentials="true">
<allowed-origins>
<origin>https://portal.contoso.com</origin>
</allowed-origins>
<allowed-methods>
<value>GET</value>
<value>POST</value>
</allowed-methods>
</cors>
<cache-lookup vary-by-developer="false" vary-by-developer-groups="false" downstream-caching-type="none">
<vary-by-query-parameter>id</vary-by-query-parameter>
</cache-lookup>
</inbound>
<backend>
<base />
</backend>
<outbound>
<base />
<cache-store duration="60" />
</outbound>
<on-error>
<base />
</on-error>
</policies>
Which change should you apply to the policy configuration to resolve the CORS error?
An enterprise is migrating its legacy payment processing API to Azure API Management (APIM). To support blue-green deployments, the API gateway must route incoming requests dynamically based on a custom HTTP header named `X-Routing-Environment`. If the header value is `canary`, the gateway must route the request to a backend service registered with the ID `canary-endpoint`. Otherwise, the request should continue to the default backend.
Complete the following XML policy snippet to implement the dynamic routing logic. Fill in the blanks with the correct context variable and policy element name.
Aşağıdaki boşlukları doldurun
xml
<policies>
<inbound>
<base />
<choose>
<when condition="@(.Request.Headers.GetValueOrDefault("X-Routing-Environment") == "canary")">
< backend-id="canary-endpoint" />
</when>
</choose>
</inbound>
</policies>
You are configuring caching policies in Azure API Management (APIM) for a weather forecast API to reduce backend load. The API has the following requirements:
- Cache successful backend responses for 300 seconds.
- Vary the cached responses based on the HTTP header named 'Accept-Language' and the query parameter named 'city'.
- Prevent caching of responses that contain sensitive data, which is indicated by a custom backend response header 'X-Cache-Private: true'.
Which two of the following policy configurations must you implement to meet these requirements?
Geçerli olan tümünü seçin
<cache-lookup vary-by-developer="false" vary-by-developer-groups="false" downstream-caching-type="none">
<vary-by-header>Accept-Language</vary-by-header>
<vary-by-query-parameter>city</vary-by-query-parameter>
</cache-lookup>
<cache-store duration="300" condition="@(context.Response.Headers.GetValueOrDefault('X-Cache-Private', '') != 'true')" />
<cache-store duration="300" condition="@(context.Response.Headers.GetValueOrDefault('X-Cache-Private', '') != 'true')" />
<cache-lookup vary-by-developer="false" vary-by-developer-groups="false" downstream-caching-type="none">
<vary-by-header>Accept-Language</vary-by-header>
<vary-by-query-parameter>city</vary-by-query-parameter>
</cache-lookup>
You are developing a C# (.NET) management utility to perform maintenance on an Azure Event Hubs ingestion pipeline. The pipeline uses the `EventProcessorClient` along with an Azure Blob Storage container to store checkpoints and partition ownership leases. To force a partition to be reprocessed from the beginning of the stream, your utility must delete the corresponding checkpoint blob. When the utility attempts to delete the blob, a `RequestFailedException` is thrown with HTTP status code (Precondition Failed) because an active processor instance holds an active lease on the blob. How should you resolve this issue in your C# code to successfully delete the checkpoint blob?
You manage a vehicle telematics API named VeloTrack that is hosted on an Azure App Service Web App. The web app currently runs on a Standard (S1) App Service plan with a default instance count of 1. You need to configure metric-based autoscale settings to handle CPU spikes and prevent autoscale flapping. Which two configurations should you select to meet these requirements? (Choose two.)
Geçerli olan tümünü seçin
You are developing a C# console application that processes telemetry alerts from wind turbines using an Azure Service Bus queue. The application uses the `Azure.Messaging.ServiceBus` SDK.
You write the following code:
csharp
using System;
using System.Threading.Tasks;
using Azure.Messaging.ServiceBus;
// ... connection details omitted for brevity ...
var client = new ServiceBusClient(connectionString);
var options = new ServiceBusProcessorOptions
{
ReceiveMode = ServiceBusReceiveMode.PeekLock,
AutoCompleteMessages = false
};
ServiceBusProcessor processor = client.CreateProcessor(queueName, options);
processor.ProcessMessageAsync += async args =>
{
try
{
await ProcessAlertAsync(args.Message);
// Line X
}
catch (Exception)
{
// Line Y
}
};
You must ensure that:
1. Messages are not lost if the application crashes during processing.
2. Messages that fail due to transient errors are returned to the queue to be retried.
3. Successfully processed messages are removed from the queue immediately.
Which two code segments should you use to replace Line X and Line Y? (Select two.)
Geçerli olan tümünü seçin
You are developing a C# desktop application that needs to authenticate users against Microsoft Entra ID using the Microsoft Identity Platform.
Which two components from the Microsoft.Identity.Client namespace must you use to configure and represent the client application?
Select two.
Geçerli olan tümünü seçin
A developer needs to configure a local development environment for a lightweight Go application using the Azure Functions Core Tools custom handler feature and test the function locally. Which sequence of steps should the developer perform?
Öğeleri doğru sıraya koymak için sürükleyin
An organization exposes an internal human resources API through Azure API Management (APIM). The API must meet the following security requirements:
1. Restrict access to clients originating from the IP subnet .
2. Validate a JSON Web Token (JWT) issued by Microsoft Entra ID before routing the request to the backend service.
A developer defines the following APIM policy:
xml
<policies>
<inbound>
<base />
</inbound>
<backend>
<base />
</backend>
<outbound>
<ip-filter action="allow">
<address-subnet>192.168.100.0/24</address-subnet>
</ip-filter>
<jwt-validate header-name="Authorization" failed-validation-httpcode="401" failed-validation-error-message="Unauthorized">
<openid-config url="https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration" />
</jwt-validate>
<base />
</outbound>
<on-error>
<base />
</on-error>
</policies>
Which of the following describes the behavior of this policy configuration?
You are developing a web application using ASP.NET Core 8.0 that will run on Azure App Service. The application is configured to send telemetry to an Azure Application Insights instance. You need to implement the Application Insights Snapshot Debugger to capture call stacks when unhandled exceptions occur, and ensure that developers can download and analyze these snapshots from the Azure portal.
Which of the following actions should you perform? (Select TWO.)
Geçerli olan tümünü seçin
A company implements a data ingestion system using C# and the Azure.Storage.Blobs SDK (v12). A background service must overwrite the content of an existing block blob. To prevent concurrent write conflicts, an active lease has already been acquired on the target blob. The active lease ID is stored in a string variable named `activeLeaseId`.
You need to write the code that uploads the new content to the block blob, ensuring that the operation fails if the lease ID does not match. Which code segment should you use to perform the upload?
{
AccessConditions = new BlobAccessConditions { LeaseId = activeLeaseId }
};
await blobClient.UploadAsync(contentStream, options);
{
LeaseId = activeLeaseId
};
await blobClient.UploadAsync(contentStream, options);
{
Conditions = new BlobRequestConditions { LeaseId = activeLeaseId }
};
await blobClient.UploadAsync(contentStream, options);
{
Conditions = new BlobRequestConditions { Lease = activeLeaseId }
};
await blobClient.UploadAsync(contentStream, options);