swagger-stats
swagger-stats copied to clipboard
Allow setting different uriPaths for ui, stats and metrics
It would be nice to be able to set a specific uriPath for each of the ui, stats & metrics endpoints.
For example, some tools expects the /metrics endpoint to be exposed on the root URL of a pod/service and can scrape metrics without any further configuration.
This is does not seem currently possible in Swagger-stats.
@gdoyer-oxv what tool do you have in mind?
@chadxz Prometheus
@gdoyer-oxv The "scrape_config" section of the prometheus configuration file has an option for defining the endpoint to scrape:
# The HTTP resource path on which to fetch metrics from targets.
[ metrics_path: <path> | default = /metrics ]
https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config
Edit: I see now that you were hoping to not configure prometheus in a special way. Sorry, at first I thought you were indicating you were blocked by this.