Either in ECH or in other platforms (ECK, ECE, etc).
It should have an APM server.
Capture the following information from the Elastic APM page from Kibana:
SERVICE_NAME=<YOUR_SERVICE_NAME>
SERVER_URL=<APM_SERVER_ENDPOINT>
SECRET_TOKEN=<APM_TOKEN>
In your virtualenv run:
pip install elastic-apm
Inside your app.py file add:
from elasticapm.contrib.starlette import ElasticAPM
app = FastAPI() # this should already exist
app.add_middleware(ElasticAPM) # APMIn a CLI write:
export ELASTIC_APM_SERVICE_NAME=<YOUR_SERVICE_NAME>
export ELASTIC_APM_SERVER_URL=<APM_SERVER_ENDPOINT>
export ELASTIC_APM_SECRET_TOKEN=<APM_TOKEN>
python3 app.pyAnd send some responses.
Go to Observability > Aoplications > Service Inventory and see your service.