Interpret CSP and Monitor results
These two short activities check your model of the failure patterns in this module before the knowledge check. Decide each answer before you read it.
Interpret a CSP console error
Contoso's equipment-provisioning app calls the external device-availability service. An employee says the stock check "just spins." You open DevTools (F12), switch to Console, filter to Errors only, and see this message:
Connecting to 'https://stock.contoso-devices.example.com' violates the following Content Security Policy directive: "connect-src 'none'"
- Which CSP directive do you need to change, and what's its current value?
- Is the fix you make going to merge with the default value, or replace it?
- Who can actually apply the fix: you, or someone else?
- After the fix is applied, what two things do you do to confirm it worked?
Check your interpretations:
connect-src. It's currently'none', which is why any outbound call beyond what the platform already permits gets blocked.- Replace.
connect-srcis the one directive where your addition replaces the default instead of merging with it, because the default is'none'. - An environment administrator. You identify the exact directive and origin from the console message, but only an environment admin can turn the directive off and supply the custom value.
- Wait a few minutes for the change to propagate, then refresh the app and check the console again to confirm the violation message is gone.
Read a Monitor result
A coordinator reports device-stock checks feel slow today, and only for some employees. You open Monitor under Products > Power Apps for the environment.
- Is Monitor the right first stop for "is this happening to one person or everyone"? Why or why not?
- The Data request success rate metric shows a spike in failures, and the recommendation names HTTP 429. What does that tell you, and what's a reasonable next step?
- You want to see the exact request URL, status code, and duration for one employee's slow session. Does Monitor show you that, or do you need something else?
- The app failed to load at all for one employee this morning, before any screen rendered. Will Application Insights have a record of that failure?
Check your readings:
- Yes. Monitor aggregates across every user and session in the environment, so it's the right place to tell whether a problem is widespread or isolated to one person's session.
- HTTP 429 points to network throttling. Evaluate reducing the data calls the app makes, since too many requests are hitting a rate limit.
- Something else. Monitor's recommendations explain why at the aggregate level, not the specific request, user, or session. For that level of detail, you'd query Application Insights'
NetworkRequestMetricData(url, method, duration, statusCode, responseSize) for that session, or inspect DevTools' Network tab live. - No. Application Insights only captures telemetry after the app successfully loads. A startup failure never reaches the logger, so Monitor is the only place that surfaces it.
If any answer surprised you, reread the section it comes from before the knowledge check.