{"id":14974212,"url":"https://github.com/gghez/flask_applicationinsights","last_synced_at":"2026-01-23T03:54:57.861Z","repository":{"id":57430116,"uuid":"146034517","full_name":"gghez/flask_applicationinsights","owner":"gghez","description":"Microsoft Azure Application Insights extension for Flask","archived":false,"fork":false,"pushed_at":"2023-05-01T20:21:35.000Z","size":18,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T18:03:57.163Z","etag":null,"topics":["api","applicationinsights","azure","flask","microsoft","python","rest"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gghez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-24T20:00:07.000Z","updated_at":"2018-10-04T14:59:15.000Z","dependencies_parsed_at":"2024-09-23T15:00:46.418Z","dependency_job_id":null,"html_url":"https://github.com/gghez/flask_applicationinsights","commit_stats":{"total_commits":26,"total_committers":2,"mean_commits":13.0,"dds":"0.038461538461538436","last_synced_commit":"772488d302068c5f0a7f3ccc6b66fd2520843f84"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gghez%2Fflask_applicationinsights","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gghez%2Fflask_applicationinsights/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gghez%2Fflask_applicationinsights/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gghez%2Fflask_applicationinsights/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gghez","download_url":"https://codeload.github.com/gghez/flask_applicationinsights/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514942,"owners_count":21117070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","applicationinsights","azure","flask","microsoft","python","rest"],"created_at":"2024-09-24T13:50:10.370Z","updated_at":"2026-01-23T03:54:57.775Z","avatar_url":"https://github.com/gghez.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flask_applicationinsights\n\nFlask extension for Microsoft Azure Application Insights.\n\nMake your Flask application able to send tracking information to an Application Insights Azure component.\n\n[![Build Status](https://travis-ci.org/gghez/flask_applicationinsights.svg?branch=master)](https://travis-ci.org/gghez/flask_applicationinsights)\n[![codecov](https://codecov.io/gh/gghez/flask_applicationinsights/branch/master/graph/badge.svg)](https://codecov.io/gh/gghez/flask_applicationinsights)\n\n## Dependencies\n\n- flask\u003e=1.0.2\n- applicationinsights==0.11.6\n\n\u003e If you are encountering locale issues with application insights, please check this hack: https://github.com/Azure/azure-cli-shell/issues/63\n\n## Usage\n\nRetrieve package from pypi:\n\n```\npip install flask_applicationinsights\n```\n\n\u003e Instrumentation key can be provided programmatically as well as by environment variable or flask configuration key.\nKey name is `APPINSIGHTS_INSTRUMENTATION_KEY`.\n\n### Basic\n\nWill track all requests (succeeded or failed) to your application insight referenced by its instrumentation key.\n\n```python\nfrom flask import Flask\nfrom flask_applicationinsights import ApplicationInsights\n\napp = Flask(__name__)\n\ninsight = ApplicationInsights(instrumentation_key='\u003cyours\u003e')\ninsight.init_app(app)\n\n@app.route('/')\ndef index():\n    return 'HIT'\n\napp.run()\n```\n\n### Advanced\n\nYou can also add custom properties or measurements to each tracked request by using special decorators.\n\n```python\n...\n\ninsight = ApplicationInsights(...)\n...\n\n@insight.properties\ndef custom_properties(req: Request, resp: Response):\n    return {\n        'req_pragma': req.headers.get('Pragma'),\n        'resp_charset': resp.charset\n    }\n```\n\n## Contribution\n\nNot open yet due to initial WIP.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgghez%2Fflask_applicationinsights","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgghez%2Fflask_applicationinsights","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgghez%2Fflask_applicationinsights/lists"}