Skip to content

Commit

Permalink
zero-code/python: add django applications notes in operator doc (#5443)
Browse files Browse the repository at this point in the history
Co-authored-by: opentelemetrybot <[email protected]>
Co-authored-by: Phillip Carter <[email protected]>
  • Loading branch information
3 people authored Oct 22, 2024
1 parent 0457368 commit fc72093
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion content/en/docs/zero-code/python/operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ title: Using the OpenTelemetry Operator to Inject Auto-Instrumentation
linkTitle: Operator
aliases: [/docs/languages/python/automatic/operator]
weight: 30
cSpell:ignore: distro grpcio mkdir psutil uninstrumented virtualenv
# prettier-ignore
cSpell:ignore: distro grpcio mkdir myapp psutil PYTHONPATH uninstrumented virtualenv
---

If you run your Python service in Kubernetes, you can take advantage of the
Expand All @@ -26,3 +27,13 @@ specific Python version. The
provides images for a single Python version based on the glibc C library. If you
want to use it you might need to build your own image operator Docker image for
Python auto-instrumentation.

#### Django applications

Applications that run from their own executable like Django requires to set in
your deployment file two environment variables:

- `PYTHONPATH`, with the path to the Django application root directory, e.g.
"/app"
- `DJANGO_SETTINGS_MODULE`, with the name of the Django settings module, e.g.
"myapp.settings"

0 comments on commit fc72093

Please sign in to comment.