Exposes a simple API that Prometheus can call to scrape metrics
- Deploy the code
- Create a public site
- Give access to the
PrometheusAPI
class to the site guest user a. Go to the site and click onPublic Access Settings
b. AddPrometheusAPI
to theEnabled Apex Class Access
- Navigate to
<public site url>/services/apexrest/api/v1/prometheus
to view the API!