Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to Create Function on Azure: OperationalInsights #3352

Closed
pamelafox opened this issue Sep 22, 2022 · 2 comments · Fixed by #3358
Closed

Error when trying to Create Function on Azure: OperationalInsights #3352

pamelafox opened this issue Sep 22, 2022 · 2 comments · Fixed by #3358
Labels
Milestone

Comments

@pamelafox
Copy link
Member

I am trying to follow the tutorial steps here:
https://learn.microsoft.com/en-us/azure/azure-functions/create-first-function-vs-code-python#publish-the-project-to-azure

However, each time I do it, I get this error:
Screen Shot 2022-09-22 at 10 10 56 AM

I followed the link to the page about errors, but this particular error isn't listed there, and I'm not sure how to resolve the lack of access to OperationalInsights, since I'm not quite sure what those are.

I also notice that my portal has successfully created application service plans each time I run through the process (so I assume the error happens after the creation of those plans):
Screen Shot 2022-09-22 at 10 34 22 AM

@nturinski nturinski added the bug label Sep 23, 2022
@nturinski nturinski added this to the 1.9.0 milestone Sep 23, 2022
@nturinski
Copy link
Member

@pamelafox Thanks for bringing this to our attention. This is happening because the namespace Microsoft.OperationalInsights needs to be registered as a provider available to your subscription.

We usually do this for users automatically here: https://github.com/microsoft/vscode-azurefunctions/blob/main/src/utils/azure.ts#L69-L78

We recently started creating Log Analytics workspaces for users in the creation process, but we didn't realize that this has a different namespace that we should have registered.

The easiest workaround to this is to create a Log Analytics workspace in the Azure Portal.

@pamelafox
Copy link
Member Author

I was also able to workaround it by registering the provider with AZ CLI from command line:

az provider register --namespace Microsoft.OperationalInsights

Thanks for working on a fix!

@microsoft microsoft locked and limited conversation to collaborators Nov 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants