diff --git a/CHANGELOG.md b/CHANGELOG.md index 67a20c15e4d..955e47dcd00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re ### Added - [#6185](https://github.com/thanos-io/thanos/pull/6185) Tracing: tracing in OTLP support configuring service_name. +- [#6192](https://github.com/thanos-io/thanos/pull/6192) Store: add flag `bucket-web-label` to select the label to use as timeline title in web UI ### Fixed diff --git a/cmd/thanos/store.go b/cmd/thanos/store.go index 81aadcd72da..af13485feec 100644 --- a/cmd/thanos/store.go +++ b/cmd/thanos/store.go @@ -79,6 +79,7 @@ type storeConfig struct { ignoreDeletionMarksDelay commonmodel.Duration disableWeb bool webConfig webConfig + label string postingOffsetsInMemSampling int cachingBucketConfig extflag.PathOrContent reqLogConfig *extflag.PathOrContent @@ -183,6 +184,8 @@ func (sc *storeConfig) registerFlag(cmd extkingpin.FlagClause) { cmd.Flag("web.disable-cors", "Whether to disable CORS headers to be set by Thanos. By default Thanos sets CORS headers to be allowed by all."). Default("false").BoolVar(&sc.webConfig.disableCORS) + cmd.Flag("bucket-web-label", "Prometheus label to use as timeline title in the bucket web UI").StringVar(&sc.label) + sc.reqLogConfig = extkingpin.RegisterRequestLoggingFlags(cmd) } @@ -476,7 +479,7 @@ func runStore( // Configure Request Logging for HTTP calls. logMiddleware := logging.NewHTTPServerMiddleware(logger, httpLogOpts...) - api := blocksAPI.NewBlocksAPI(logger, conf.webConfig.disableCORS, "", flagsMap, bkt) + api := blocksAPI.NewBlocksAPI(logger, conf.webConfig.disableCORS, conf.label, flagsMap, bkt) api.Register(r.WithPrefix("/api/v1"), tracer, logger, ins, logMiddleware) metaFetcher.UpdateOnChange(func(blocks []metadata.Meta, err error) { diff --git a/docs/components/store.md b/docs/components/store.md index 015d66e8981..f9120b76ccb 100644 --- a/docs/components/store.md +++ b/docs/components/store.md @@ -36,6 +36,9 @@ Flags: Number of goroutines to use when constructing index-cache.json blocks from object storage. Must be equal or greater than 1. + --bucket-web-label=BUCKET-WEB-LABEL + Prometheus label to use as timeline title in the + bucket web UI --cache-index-header Cache TSDB index-headers on disk to reduce startup time. When set to true, Thanos Store will download index headers from remote object