Skip to content

Commit 8a921cc

Browse files
committed
docs: Add troubleshooting page
1 parent eda948c commit 8a921cc

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ With EDOT Python you have access to all the features of the OpenTelemetry Python
2323
* [Manual instrumentation](./docs/manual-instrumentation.md)
2424
* [Configuration](./docs/configure.md)
2525
* [Migrating from Elastic APM Python Agent](./docs/migrate-from-apm.md)
26+
* [Troubleshooting](./docs/troubleshooting.md)
2627

2728
## Install
2829

docs/troubleshooting.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<!--
2+
Goal of this doc:
3+
The user is able to overcome on their own some basic issues
4+
-->
5+
6+
# Troubleshooting
7+
8+
Below are some resources and tips for troubleshooting and debugging the Elastic Distribution of OpenTelemetry Python (EDOT Python).
9+
10+
- [Easy Fixes](#easy-fixes)
11+
- [Disable EDOT](#easy-fixes)
12+
13+
## Easy Fixes
14+
15+
Before you try anything else, go through the following sections to ensure that
16+
EDOT Python is configured correctly. This is not an exhaustive list, but rather
17+
a list of common problems that users run into.
18+
19+
### Debug and development modes
20+
21+
Most frameworks support a debug mode. Generally, this mode is intended for
22+
non-production environments and provides detailed error messages and logging of
23+
potentially sensitive data.
24+
25+
#### Django
26+
27+
Django applications running with the Django `runserver` need to use the `--noreload` parameter in order to be instrumented with `opentelemetry-instrument`.
28+
Remember that you also need to set the `DJANGO_SETTINGS_MODULE` environment variable pointing to the application settings module.
29+
30+
#### FastAPI
31+
32+
FastAPI application started with `fastapi dev` requires the reloader to be disabled with `--no-reload` in order to be instrumented with `opentelemetry-instrument`.
33+
34+
#### Flask
35+
36+
Flask applications running in debug mode will require to disable the reloader in order to being traced, see [OpenTelemetry zero code documentation](https://opentelemetry.io/docs/zero-code/python/example/#instrumentation-while-debugging).
37+
38+
## Disable EDOT
39+
40+
In the unlikely event EDOT Python causes disruptions to a production application, you can disable it while you troubleshoot.
41+
42+
To disable the underlying OpenTelemetry SDK you set the following environment variable `OTEL_SDK_DISABLED=true`.
43+
44+
If only a subset of instrumentation are causing disruptions you can disable them with the `OTEL_PYTHON_DISABLED_INSTRUMENTATIONS`
45+
environment variable. It accepts a list of comma separated instrumentations to disable, see [OpenTelemetry zero code documentation](https://opentelemetry.io/docs/zero-code/python/configuration/#disabling-specific-instrumentations)

0 commit comments

Comments
 (0)