Add flask instrumentation#562
Conversation
|
@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. |
|
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). |
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.