Thundra APM
Search…
Deployment Integrations
Flask

Step 1: Install Thundra

Install thundra to your environment by running:
1
pip install --upgrade thundra
Copied!

Step 2: Configure Integration

Initialize and configure thundra in your application before initializing your flask app. After that thundra will automatically trace all your flask requests.
1
import thundra
2
3
# You can provide configuration options with thundra.configure
4
# Configure thundra.apikey in here or by setting
5
# thundra_apiKey environment variable while running your application
6
thundra.configure(
7
options={
8
"config": {
9
"thundra.apikey": "<your-api-key-here>",
10
"thundra.agent.application.name": "sample_app", # Sample configuration, not required
11
}
12
}
13
)
14
Copied!

Additional Configurations:

Enabling Request Body Tracing
Http request body is not sent to thundra by default. To be able to trace the request body to your endpoints, you can set THUNDRA_TRACE_REQUEST_SKIP environment variable to false or by providing it to options.config as in the below configuration.
1
import thundra
2
3
# You can provide configuration options with thundra.configure
4
# Configure thundra.apikey in here or by setting
5
# thundra_apiKey environment variable while running your application
6
thundra.configure(
7
options={
8
"config": {
9
"thundra.apikey": "<your-api-key-here>",
10
"thundra.agent.application.name": "sample_app", # Sample configuration, not required
11
"thundra.agent.trace.request.skip": False
12
}
13
}
14
)
Copied!
Last modified 11mo ago