8000 zero-code/python: document OTEL_PYTHON_AUTO_INSTRUMENTATION_EXPERIMEN… · open-telemetry/opentelemetry.io@9383da2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9383da2

Browse files
authored
zero-code/python: document OTEL_PYTHON_AUTO_INSTRUMENTATION_EXPERIMENTAL_GEVENT_PATCH (#7667)
1 parent d91fafb commit 9383da2

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

content/en/docs/zero-code/python/configuration.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ weight: 10
55
aliases:
66
- /docs/languages/python/automatic/configuration
77
- /docs/languages/python/automatic/agent-config
8-
cSpell:ignore: healthcheck instrumentor myapp pyproject Starlette urllib
8+
# prettier-ignore
9+
cSpell:ignore: gevent healthcheck instrumentor monkeypatch myapp pyproject Starlette urllib
910
---
1011

1112
The agent is highly configurable, either by:
@@ -146,6 +147,9 @@ specific category.
146147
- `OTEL_PYTHON_ID_GENERATOR`: to specify which IDs generator to use for the
147148
global Tracer Provider
148149
- `OTEL_PYTHON_INSTRUMENTATION_SANITIZE_REDIS`: to enable query sanitization
150+
- `OTEL_PYTHON_AUTO_INSTRUMENTATION_EXPERIMENTAL_GEVENT_PATCH`: set to
151+
`patch_all` to call gevent monkeypatch `patch_all` method before initializing
152+
the SDK
149153

150154
Examples:
151155

@@ -155,6 +159,7 @@ export OTEL_PYTHON_ELASTICSEARCH_NAME_PREFIX=my-custom-prefix
155159
export OTEL_PYTHON_GRPC_EXCLUDED_SERVICES="GRPCTestServer,GRPCHealthServer"
156160
export OTEL_PYTHON_ID_GENERATOR=xray
157161
export OTEL_PYTHON_INSTRUMENTATION_SANITIZE_REDIS=true
162+
export OTEL_PYTHON_AUTO_INSTRUMENTATION_EXPERIMENTAL_GEVENT_PATCH=patch_all
158163
```
159164

160165
## Disabling Specific Instrumentations

content/en/docs/zero-code/python/operator.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Using the OpenTelemetry Operator to Inject Auto-Instrumentation
33
linkTitle: Operator
44
aliases: [/docs/languages/python/automatic/operator]
55
weight: 30
6-
cSpell:ignore: grpcio myapp psutil PYTHONPATH
6+
cSpell:ignore: gevent grpcio monkeypatch myapp psutil PYTHONPATH
77
---
88

99
If you run your Python service in Kubernetes, you can take advantage of the
@@ -40,3 +40,10 @@ your deployment file two environment variables:
4040
"/app"
4141
- `DJANGO_SETTINGS_MODULE`, with the name of the Django settings module, e.g.
4242
"myapp.settings"
43+
44+
#### gevent applications
45+
46+
Since the OpenTelemetry Python 1.37.0/0.58b0 release if you set in your
47+
deployment file the `OTEL_PYTHON_AUTO_INSTRUMENTATION_EXPERIMENTAL_GEVENT_PATCH`
48+
environment variable to `patch_all` the auto-instrumentation code will call the
49+
gevent monkeypatch method with the same name before initializing itself.

0 commit comments

Comments
 (0)
0