Azure App Service: Poor deployment and developer experience in Python

Paul-Louis Pröve 20 Reputation points
2024-02-20T08:55:29.4833333+00:00

I've used Azure App Service to build web servers for REST APIs over the past months and the developer experience has been very poor. I'm working in Python with FastAPI and deploy the applications through GitHub CI/CD workflows as code deployments.

1) Unhelpful error messages during deployment

The error messages in the GitHub workflow (which was generated by Azure) are oftentimes not helpful at all. They then refer to the deployment logs in Azure which are equally unhelpful and leave me guessing.

2) Unreproducable error messages during deployment

Sometimes when errors don't make any sense, I just redeploy without changes and that often fixes the problem. That gives me little confidence in the deployment stability.

3) Cannot activate Application Insights

For some reason I cannot turn on Application Insights for my web server. The option is grayed out and I haven't been able to find an explanation for this.

4) App deploys but doesn't run

Oftentimes the deployment is successful but the application still doesn't run. Again, the log stream isn't always helpful of what's going on.

5) Logs all over the place

There's so many sources for logs that it just gets confusing. I find myself switching between them and not finding what I want. GitHub deployment logs, Azure deployment logs, Log Stream, Application Insights. It feels a bit too much.

All of this won't change in a day, so I would love to hear some recommendations what I can do. Should I switch to Docker Container deployments? Should I switch to Container Apps? Should I switch to Functions? Am I being stupid doing what I'm doing? Please advise.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,933 questions
{count} votes

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 17,731 Reputation points Microsoft Employee Moderator
    2024-02-21T18:19:34.1966667+00:00

    @Paul-Louis Pröve Thank you for sharing your feedback. Please note that Microsoft Q&A is a place to receive technical support. For product feedback, we kindly request you to share any feedback to the Azure feedback site. The product group routinely checks here for customer feedback on how they can improve the product.

    For points 1, 2, & 4 there is not enough information here to provide technical support and this appears to be more related to providing feedback on your experience. If you encounter issues with error messages being too vague, deployment issues, or issues with your app running after deployment, please create a new forum post for each issue and provide us as many technical details in the post as you can so we can help you troubleshoot the issue. We also have a meeting next week with the product group and have added your feedback for their review.

    In regard to point 3, there are two ways to configure Application Insights with Azure App Service. Codeless and via the Application Insights SDK. Codeless use of Application Insights is the toggle that you see. It allows you to simply toggle a switch and start collecting logging. Codeless Application Insights is not supported for every language framework. For example, most Windows App Service languages support codeless integration of Application Insights. When it comes to Linux App Service languages, the support is offered on .NET 6 and newer but is not supported for items like Python. Since you verified in your post that you are running Python, this is why. To use Application Insights with a Python Application, please see here for more information on how to integrate the SDK.

    For point 5, we try to provide all the native logging you would need within the product. If you would like a more streamlined logging experience, we would suggest you consider using a product such as Azure Monitor. For more information on how to configure Azure Monitor for your Python application, please see here.

    And most importantly, to answer what I believe is the primary question of your post, any of the products you mentioned would be able to support your app requirements of using GitHub for deployment, Python, and FastAPI usage. I want to note that Azure Functions is basically highly customized App Service and uses the same code base. For that reason, some of the feedback you mentioned above, might persist. For the usage of a docker container app, this scenario would provide you more control over the building of the environment including logging. If you are used to a traditional IaaS environment where you have more control but still want the benefits that PaaS provides of less daily/monthly maintenance this can be a good compromise. For Container Apps, I do not have much experience with this product so I cannot speak to it. Lastly, another option is to stick with your current setup and leverage the forum for when you have a specific issue (ensuring you provide the necessary error messages and other technical information for us to help assist). Microsoft Q&A exists as a place for developers to receive technical support. There is a team of us dedicated to helping customers and we have monthly meetings with the product group where we can share your feedback and technical challenges.

    The last item I ask is that you consider accepting this answer by clicking the button. This will help our management know we are providing you with the support required to help you on your Azure journey and helps me out as well. We'll be here to continue assisting you and would appreciate your help in marking this as the answer. Thank you

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.