Monitoring deployed applications
Exposing the metrics endpoint
Ensure that your application backend metric endpoint is exported from the same port as the application server. This allows Prometheus to scrape and collect metrics effectively from your deployed applications.
The metrics path can be customized on deployment request. If it is not specified, the default value is /metrics.
Deploying the application with monitoring enabled
If application monitoring is enabled in your
PhariaOS configuration,
you can deploy your application with monitoring enabled. You can include the following in the config parameter for your application deployment:
"config": {
...,
"serviceMonitor": {
"enabled": true,
"scrapingInterval": "5s", # default is 30s
"path": "/custom-metrics" # default is `/metrics`
}
}