Skip to content

Commit 379a2ae

Browse files
committed
Fix fprocess in python OTEL instrumentation
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <[email protected]>
1 parent 7f34712 commit 379a2ae

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

docs/languages/python.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -417,17 +417,13 @@ RUN pip install --no-cache-dir --user -r requirements.txt
417417

418418
The `opentelemetry-bootstrap -a install` command reads through the list of packages installed in your active site-packages folder, and installs the corresponding instrumentation libraries for these packages, if applicable. The OpenTelemetry Python agent uses [monkey patching](https://stackoverflow.com/questions/5626193/what-is-monkey-patching) to modify functions in these libraries at runtime.
419419

420-
421-
Update the fprocess ENV in the Dockerfile to start the OpenTelemetry agent:
420+
Update the function process in `template.yaml`to start the OpenTelemetry agent:
422421

423422
```diff
424-
# configure WSGI server and healthcheck
425-
USER app
426-
427-
- ENV fprocess="python index.py"
428-
+ ENV fprocess="opentelemetry-instrument python index.py"
423+
language: python3-http
424+
- fprocess: python index.py
425+
+ fprocess: opentelemetry-instrument python index.py
429426
```
430-
431427
Use your modified template to create a new function.
432428

433429
The OpenTelemetry agent can be configured using environment variables on the function:

0 commit comments

Comments
 (0)