Skip to content

ampaking/azure_application_insights

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastAPI Application with Azure Application Insights Integration

This repository contains a FastAPI application that is integrated with Azure Application Insights for enhanced observability and monitoring. It showcases how to set up basic telemetry, including custom logging, within a Python web application.

Prerequisites

  • Python 3.7+
  • An Azure account
  • Azure Application Insights resource

Setting Up

  1. Clone the Repository

    git clone `project`
    cd `<repository-name>`
  2. Install Dependencies

    Create a virtual environment and activate it:

    python -m venv .venv
    
    Mac or Linux:
    source .venv/bin/activate
    
    Windows:
    .\.venv\Scripts\activate

    Install the required packages:

    pip install -r requirements.txt
  3. Configure Environment Variables

    Copy the .env.example file to a new file named .env, and fill in the APPLICATIONINSIGHTS_CONNECTION_STRING with your Azure Application Insights connection string.

    APPLICATIONINSIGHTS_CONNECTION_STRING=<your_connection_string>
    

Running the Application

To run the application locally, use the following command:

uvicorn main:app --reload

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages