Skip to content

Comments

Add flask instrumentation#562

Merged
Bionic711 merged 3 commits intomicrosoft:Developmentfrom
clarked-msft:flask-intrumentor
Jan 6, 2026
Merged

Add flask instrumentation#562
Bionic711 merged 3 commits intomicrosoft:Developmentfrom
clarked-msft:flask-intrumentor

Conversation

@clarked-msft
Copy link
Contributor

@clarked-msft clarked-msft commented Jan 6, 2026

Flask instrumentation with option to disable in case of telemetry issues. This surfaces flask requests in app insights with an operation ID, and links traces, exceptions etc using operation id.

Down the road the direct app insights logging like log_event from functions_appinsights.py could be replaced with opentelemetry spans and tags to simplify and make the logging more robust.

image

@Bionic711
Copy link
Collaborator

@clarked-msft Update this to be a setting in the admin settings tab that is a toggle on the logging tab. If this still logs to app insights, you can throw it under that section with the global toggle. If this goes directly to log analytics, you will need to create a new section for the toggle. Be sure to include an informational mouseover with more in-depth explaination about what the setting does. Call it "in-depth insights" or something along those lines. I like the concept though. Because it is in app.py, it likely requires an app service reboot in order to take effect. Add a blurb about it requiring a restart. There are other blurbs like this (such as with enabling agents/global/per workspace).

Ping me if you need any help with it.

@Bionic711
Copy link
Collaborator

Spoke with Ed offline. Accept as-is after he adds some documentation into a new troubleshooting folder under docs. He will also open an issue to track adding other settings into admin that make more sense rather than globally disabling it from the app_settings (easier access to app config than cosmos data).

@Bionic711 Bionic711 merged commit 164dd80 into microsoft:Development Jan 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants