Exploring metrics requires Microsoft.Insights resource provider registered in your subscription. In many cases, it is registered automatically (that is, after you configure an alert rule, customize diagnostic settings for any resource, or configure an autoscale rule). If the Microsoft.Insights
resource provider is not registered, you must manually register it by following steps described in Azure resource providers and types.
Try these steps:
In Azure Portal> Open Subscriptions, Resource providers tab, and verify that Microsoft.Insights
is registered for your subscription.
If the issue still persist; from the issue description I believe it's a new subscription and you just started provisioning the resources. Are you an admin or co-admin/or have any specific RBAC role assigned on the subscription?
The doc, you referenced is however related to API support in Azure Static Web Apps with Azure Functions; but linked to Application Insights itself.