Skip to content

Commit

Permalink
Rename feature flag
Browse files Browse the repository at this point in the history
Rename `scrape-timeout-metric` to `extra-scrape-metrics`.

Signed-off-by: SuperQ <superq@gmail.com>
  • Loading branch information
SuperQ committed Sep 1, 2021
1 parent 4acd672 commit 988c522
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cmd/prometheus/main.go
Expand Up @@ -153,7 +153,7 @@ func (c *flagConfig) setFeatureListOptions(logger log.Logger) error {
case "memory-snapshot-on-shutdown":
c.tsdb.EnableMemorySnapshotOnShutdown = true
level.Info(logger).Log("msg", "Experimental memory snapshot on shutdown enabled")
case "scrape-timeout-metric":
case "extra-scrape-metrics":
c.scrape.EnableScrapeTimeoutMetric = true
level.Info(logger).Log("msg", "Experimental additional scrape metrics")
case "":
Expand Down Expand Up @@ -316,7 +316,7 @@ func main() {
a.Flag("query.max-samples", "Maximum number of samples a single query can load into memory. Note that queries will fail if they try to load more samples than this into memory, so this also limits the number of samples a query can return.").
Default("50000000").IntVar(&cfg.queryMaxSamples)

a.Flag("enable-feature", "Comma separated feature names to enable. Valid options: exemplar-storage, expand-external-labels, memory-snapshot-on-shutdown, promql-at-modifier, promql-negative-offset, remote-write-receiver, scrape-timeout-metric. See https://prometheus.io/docs/prometheus/latest/feature_flags/ for more details.").
a.Flag("enable-feature", "Comma separated feature names to enable. Valid options: exemplar-storage, expand-external-labels, memory-snapshot-on-shutdown, promql-at-modifier, promql-negative-offset, remote-write-receiver, extra-scrape-metrics. See https://prometheus.io/docs/prometheus/latest/feature_flags/ for more details.").
Default("").StringsVar(&cfg.featureList)

promlogflag.AddFlags(a, &cfg.promlogConfig)
Expand Down
8 changes: 4 additions & 4 deletions docs/feature_flags.md
Expand Up @@ -62,10 +62,10 @@ This takes the snapshot of the chunks that are in memory along with the series i
it on disk. This will reduce the startup time since the memory state can be restored with this snapshot and m-mapped
chunks without the need of WAL replay.

## Scrape Timeout Metric
## Extra Scrape Metrics

`--enable-feature=scrape-timeout-metric`
`--enable-feature=extra-scrape-metrics`

This adds an additional automatically generated metric for each scrape target called `scrape_timeout_seconds`.
This adds additional automatically generated metrics for each scrape target.

This allows you to measure each target to find out how close they are to timing out with `scrape_duration_seconds / scrape_timeout_seconds`.
* `scrape_timeout_seconds`. The configured `scrape_timeout` for a target. This allows you to measure each target to find out how close they are to timing out with `scrape_duration_seconds / scrape_timeout_seconds`.

0 comments on commit 988c522

Please sign in to comment.