Example prompts for troubleshooting your application with GitHub Copilot for Azure Preview

If you're unfamiliar with Azure or you just want the tooling and AI to do most of the work, you can ask GitHub Copilot for Azure Preview to help you troubleshoot problems with your application.

Best practices

Using copilots can increase developer productivity by answering questions, executing tasks, and generating code. However, remember these vital rules:

  • Review all AI-generated responses. Validate their correctness, applicability, potential outcomes (such as costs and security) before taking action based on those responses.
  • Never save application secrets or credentials in source code.
  • Never submit application secrets or credentials in questions or in code when you ask questions.

When you're working with any tool that's based on large language models, use good prompt engineering techniques for the best results. The following tips come from the article Write effective prompts for Microsoft Copilot in Azure, which provides advice for prompt engineering in the context of Azure.

Example prompts for troubleshooting your app

If you want to use GitHub Copilot for Azure Preview for help with troubleshooting your application, you can start with an open-ended question or request. Then, add details for better results.

Open-ended prompts

  • "@azure Where can I find metrics and logs?"
  • "@azure I want to see all the error messages in the logs."
  • "@azure I'm seeing errors with my app. Look at the logs to find out why."
  • "@azure Why are my clients being disconnected so often?"
  • "@azure Why did my last deployment fail?"
  • "@azure Help me analyze my app for high CPU usage."
  • "@azure Why is my application slow?"
  • "@azure Take a memory dump of my app."

Prompts about specific timeframes

  • "@azure Grab all the errors in the logs between yesterday and today."
  • "@azure Diagnose my app to show me what problems it encountered."
  • "@azure Tell me what goes wrong with my app 'myAppName'."
  • "@azure Troubleshoot my app for any possible issues in the last 3 hours."
  • "@azure What errors did my app 'myAppName' have in the last 24 hours?"

Prompts about specific errors

  • "@azure Is there any 501 error in my app logs?"
  • "@azure Why am I seeing a 500 error when opening my website?"
  • "@azure I'm getting an xxx error code. What could be the reasons?"
  • "@azure Show me all the 4xx errors in the logs in the last 6 hours."
  • "@azure Find error messages in the logs that might correlate to 500 errors."

Prompts about specific services and technologies

Service or technology Troubleshoot prompt examples
Azure Container Apps
  • "@azure My container app won't start."
  • "@azure My users are reporting errors with my container app."
  • "@azure Can you look at my energy-api-1 container app's logs for any 404 errors?"
  • "@azure Have my container app's system console logs contained any warnings recently?"
Azure Kubernetes Service (AKS)
  • "@azure Help me troubleshoot my AKS cluster."
  • "@azure How do I troubleshoot Azure Kubernetes Service (AKS)?"
  • "@azure How can I get the logs of a specific pod?"
  • "@azure Do my kube-apiserver logs show the last time a restart occurred?"
  • "@azure My assistant-orchestrator AKS cluster is having performance problems."
  • "@azure Find out why my store-service-prod Kubernetes cluster is running slow."
  • "@azure I'd like to investigate performance problems with my Kubernetes cluster."
Azure App Service
  • "@azure How can I improve my Azure web app's performance?"
  • "@azure How do I improve my app's CPU usage?"
  • "@azure How can I improve the performance of my Azure web app?"
  • "@azure Diagnose high CPU usage in Azure App Service."
  • "@azure Show me how to detect slow performance issues in my App Service web app."
  • "@azure Investigate high CPU usage for App Service."
  • "@azure What's causing latency in my Azure web app?"
  • "@azure Can you help me diagnose high CPU usage in Azure App Service?"
  • "@azure Why am I seeing high memory usage in App Service?"
  • "@azure Help me analyze my web app downtime."
  • "@azure Help me diagnose slow performance in my Azure web app."
  • "@azure Help me collect a memory dump from Azure App Service."
  • "@azure My App Service container won't start."
  • "@azure Is there anything wrong with my bakery-api web app?"
  • "@azure Look into if my web app is having any downtime."
  • "@azure Troubleshoot why my web app is not responding."
Azure Developer CLI (azd)
  • "@azure I'm getting this error. What does it mean?"
Azure SDK
  • "@azure The npm Azure Resource Manager SDK is failing to install. What should I do?"
Azure Event Hubs
  • "@azure My application needs help with processing real-time events."
Azure OpenAI Service
  • "@azure What is using up my GPT4o model quota?"
Azure SignalR Service
  • "@azure My SignalR client is not receiving messages. Why?"
  • "@azure Why are my SignalR clients being disconnected so often?"
  • "@azure Where can I find metrics and logs for my SignalR app?"
Azure Storage
  • "@azure Can you help me choose the right Azure storage solution?"
  • "@azure What are some ways to secure my Azure storage account?"
  • "@azure I got an error 403, unauthorized blob listing."
Azure Web PubSub
  • "@azure My Web PubSub client is not receiving messages. Why?"