Hey. good evening.
I wanna know if there’s any way to instrument an app service in python on the app services. We tried some automatically way but the everytime the app services restarts, the pipe and opentelemetry is erased and had to do all it over again the the SSH. There is some documentation about this?
Automatically instrument your Python application with OpenTelemetry — Dynatrace Docs
Hi,
Probably in your case you need to make a opentelemetry persistent configuration inside your azure app, try to:
- include opentelemetry libraries in your app’s requirements.txt
- use a startup command like> opentelemetry-instrument python <your-app>.py
- Set otel env
OTEL_EXPORTER_OTLP_ENDPOINT=https://<your-dynatrace-endpoint>/api/v2/otlpOTEL_EXPORTER_OTLP_HEADERS=Authorization=Api-Token <your-token>OTEL_TRACES_EXPORTER=otlp
I’m not an Azure Expert, but it should works