Repository navigation
Closed
Milestone
Description
We should make it as easy for a user to supply the endpoints that they want to monitor. The only thing that is required is the host, all other components have some defaults:
- The protocol should only allow for
httpandhttps, wherehttpis the default. - The port should follow the default for the protocol,
80forhttpand443forhttps. - The path should default to
/metricsif the path is empty. It should not be appended if a path is already there.
This should result in the following examples:
am start 127.0.0.1: would result inhttp://127.0.0.1:80/metrics- All defaults
am start https://127.0.0.1: would result inhttps://127.0.0.1:443/metrics- Non default protocol used
am start localhost:3030: would result inhttp://localhost:3030/metrics- Non default port used
am start localhost:3030/api/metrics: would result inhttp://localhost:3030/api/metrics- Non default path used, so use that instead
am start localhost:3030/api/observability: would result inhttp://localhost:3030/api/observability- Non default path used, so use that instead (and do not add
/metricsto it)
- Non default path used, so use that instead (and do not add
A user can also mix and match these: am start 127.0.0.1 https://localhost:3030/api/observability
NOTE: since we are adding the /metrics path when a path is not present in a endpoint it is not possible to have Prometheus scrape the root of a webserver. I think this is an acceptable limitation, since it makes the "normal" usage way more easy to use and users will not likely have their metrics in the / path.
Metadata
Metadata
Assignees
Labels
No labels
Activity