swagger-stats icon indicating copy to clipboard operation
swagger-stats copied to clipboard

Allow setting different uriPaths for ui, stats and metrics

Open gdoyer-oxv opened this issue 5 years ago • 3 comments
trafficstars

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 avatar Jan 10 '20 10:01 gdoyer-oxv

@gdoyer-oxv what tool do you have in mind?

chadxz avatar Apr 16 '20 16:04 chadxz

@chadxz Prometheus

gdoyer-oxv avatar Apr 20 '20 15:04 gdoyer-oxv

@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.

chadxz avatar Apr 20 '20 15:04 chadxz