Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into multi-dedup-labels
Browse files Browse the repository at this point in the history
Signed-off-by: Krasi Georgiev <[email protected]>
  • Loading branch information
krasi-georgiev committed Sep 12, 2019
2 parents b292897 + 83583f1 commit b85ce29
Show file tree
Hide file tree
Showing 75 changed files with 1,519 additions and 360 deletions.
17 changes: 10 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ version: 2
jobs:
test:
docker:
# Available from https://hub.docker.com/r/circleci/golang/
- image: circleci/golang:1.12.5
# Build by Thanos make docker-ci
- image: quay.io/thanos/thanos-ci:v0.1.0
working_directory: /go/src/github.com/thanos-io/thanos
environment:
GO111MODULE: 'on'
GOBIN: "/go/bin"
# Run garbage collection more aggresively to avoid getting OOMed during the lint phase (4GB limit).
GOGC: "20"
# By default Go uses GOMAXPROCS but a Circle CI executor has many
Expand Down Expand Up @@ -60,11 +59,9 @@ jobs:

publish_master:
docker:
# Available from https://hub.docker.com/r/circleci/golang/
- image: circleci/golang:1.12.5
# Build by Thanos make docker-ci
- image: quay.io/thanos/thanos-ci:v0.1.0
working_directory: /go/src/github.com/thanos-io/thanos
environment:
GOBIN: "/go/bin"
steps:
- checkout
- setup_remote_docker:
Expand All @@ -74,6 +71,9 @@ jobs:
- run: ln -s .build/linux-amd64/thanos thanos
- run: make docker
- run: docker run thanos --help
# Upload to both dockerhub and quay.io.
- run: echo "${DOCKERHUB_PASSWORD}" | docker login -u="${DOCKERHUB_USERNAME}" --password-stdin
- run: make docker-push DOCKER_IMAGE_REPO=thanosio/thanos
- run: echo "${QUAY_PASSWORD}" | docker login -u="${QUAY_USERNAME}" quay.io --password-stdin
- run: make docker-push

Expand All @@ -97,6 +97,9 @@ jobs:
- run: ln -s .build/linux-amd64/thanos thanos
- run: make docker
- run: docker run thanos --help
# Upload to both dockerhub and quay.io.
- run: echo "${DOCKERHUB_PASSWORD}" | docker login -u="${DOCKERHUB_USERNAME}" --password-stdin
- run: make docker-push DOCKER_IMAGE_REPO=thanosio/thanos DOCKER_IMAGE_TAG=$CIRCLE_TAG
- run: echo "${QUAY_PASSWORD}" | docker login -u="${QUAY_USERNAME}" quay.io --password-stdin
- run: make docker-push DOCKER_IMAGE_TAG=$CIRCLE_TAG

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ data/
website/public/
website/docs-pre-processed/
!website/data

tmp/bin
1 change: 1 addition & 0 deletions .promu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ crossbuild:
- darwin/amd64
- linux/arm64
- windows/amd64
- freebsd/amd64
11 changes: 6 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,19 @@ We use *breaking* word for marking changes that are not backward compatible (rel

## Unreleased

## v0.7.0-rc.0 - 2019.08.28
## v0.7.0 - 2019.09.02

Accepted into CNCF:
- Thanos moved to new repository <https://github.com/thanos-io/thanos>
- Docker images moved to <https://quay.io/thanos/thanos>
- Docker images moved to <https://quay.io/thanos/thanos> and mirrored at <https://hub.docker.com/r/thanosio/thanos>
- Slack moved to <https://slack.cncf.io> `#thanos`/`#thanos-dev` / `#thanos-prs`

### Added

- [#1478](https://github.com/thanos-io/thanos/pull/1478) Thanos components now exposes gRPC server metrics as soon as server starts, to provide more reliable data for instrumentation.
- [#1378](https://github.com/thanos-io/thanos/pull/1378) Thanos Receive now exposes `thanos_receive_config_hash`, `thanos_receive_config_last_reload_successful` and `thanos_receive_config_last_reload_success_timestamp_seconds` metrics to track latest configuration change
- [#1268](https://github.com/thanos-io/thanos/pull/1268) Thanos Sidecar added support for newest Prometheus streaming remote read added [here](https://github.com/prometheus/prometheus/pull/5703). This massively improves memory required by single
request for both Prometheus and sidecar. Single requests now should take constant amount of memory on sidecar, so resource consumption prediction is now straightforward. This will be used if you have Prometheus `2.13` or `2.12-master`.
- [#1268](https://github.com/thanos-io/thanos/pull/1268) Thanos Sidecar added support for newest Prometheus streaming remote read added [here](https://github.com/prometheus/prometheus/pull/5703). This massively improves memory required by single
request for both Prometheus and sidecar. Single requests now should take constant amount of memory on sidecar, so resource consumption prediction is now straightforward. This will be used if you have Prometheus `2.13` or `2.12-master`.
- [#1358](https://github.com/thanos-io/thanos/pull/1358) Added `part_size` configuration option for HTTP multipart requests minimum part size for S3 storage type
- [#1363](https://github.com/thanos-io/thanos/pull/1363) Thanos Receive now exposes `thanos_receive_hashring_nodes` and `thanos_receive_hashring_tenants` metrics to monitor status of hash-rings
- [#1362](https://github.com/thanos-io/thanos/pull/1362) Optional `replicaLabels` param for `/query` and `/query_range` querier endpoints. When provided overwrite the `query.replica-label` cli flags.
Expand All @@ -41,7 +42,7 @@ Accepted into CNCF:
- [BUGFIX] prometheus_tsdb_compactions_failed_total is now incremented on any compaction failure. tsdb#613
- [BUGFIX] PromQL: Correctly display {__name__="a"}.
- [#1338](https://github.com/thanos-io/thanos/pull/1338) Thanos Query still warns on store API duplicate, but allows a single one from duplicated set. This is gracefully warn about the problematic logic and not disrupt immediately.
- [#1385](https://github.com/thanos-io/thanos/pull/1385) Thanos Compact exposes flag to disable downsampling `downsampling.disable`.
- [#1385](https://github.com/thanos-io/thanos/pull/1385) Thanos Compact exposes flag to disable downsampling `downsampling.disable`.

### Fixed

Expand Down
6 changes: 6 additions & 0 deletions Dockerfile.thanos-ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Available from https://hub.docker.com/r/circleci/golang/
FROM circleci/golang:1.12.5

ENV GOBIN=/go/bin

COPY tmp/bin ${GOBIN}
65 changes: 46 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PREFIX ?= $(shell pwd)
FILES_TO_FMT ?= $(shell find . -path ./vendor -prune -o -name '*.go' -print)

DOCKER_IMAGE_NAME ?= thanos
DOCKER_IMAGE_REPO ?= quay.io/thanos/thanos
DOCKER_IMAGE_TAG ?= $(subst /,-,$(shell git rev-parse --abbrev-ref HEAD))-$(shell date +%Y-%m-%d)-$(shell git rev-parse --short HEAD)

TMP_GOPATH ?= /tmp/thanos-go
Expand Down Expand Up @@ -46,9 +46,13 @@ ME ?= $(shell whoami)

# Limited prom version, because testing was not possible. This should fix it: https://github.com/thanos-io/thanos/issues/758
PROM_VERSIONS ?= v2.4.3 v2.5.0 v2.8.1 v2.9.2
PROMS ?= $(GOBIN)/prometheus-v2.4.3 $(GOBIN)/prometheus-v2.5.0 $(GOBIN)/prometheus-v2.8.1 $(GOBIN)/prometheus-v2.9.2

ALERTMANAGER_VERSION ?= v0.15.2
ALERTMANAGER ?= $(GOBIN)/alertmanager-$(ALERTMANAGER_VERSION)

MINIO_SERVER_VERSION ?= RELEASE.2018-10-06T00-15-16Z
MINIO_SERVER ?=$(GOBIN)/minio-$(MINIO_SERVER_VERSION)

# fetch_go_bin_version downloads (go gets) the binary from specific version and installs it in $(GOBIN)/<bin>-<version>
# arguments:
Expand Down Expand Up @@ -126,21 +130,21 @@ deps:
# docker builds docker with no tag.
.PHONY: docker
docker: build
@echo ">> building docker image '${DOCKER_IMAGE_NAME}'"
@docker build -t "${DOCKER_IMAGE_NAME}" .
@echo ">> building docker image 'thanos'"
@docker build -t "thanos" .

#docker-multi-stage builds docker image using multi-stage.
.PHONY: docker-multi-stage
docker-multi-stage:
@echo ">> building docker image '${DOCKER_IMAGE_NAME}' with Dockerfile.multi-stage"
@docker build -f Dockerfile.multi-stage -t "${DOCKER_IMAGE_NAME}" .
@echo ">> building docker image 'thanos' with Dockerfile.multi-stage"
@docker build -f Dockerfile.multi-stage -t "thanos" .

# docker-push pushes docker image build under `${DOCKER_IMAGE_NAME}` to quay.io/thanos/"$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)"
# docker-push pushes docker image build under `thanos` to "$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_TAG)"
.PHONY: docker-push
docker-push:
@echo ">> pushing image"
@docker tag "${DOCKER_IMAGE_NAME}" quay.io/thanos/"$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)"
@docker push quay.io/thanos/"$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)"
@docker tag "thanos" "$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_TAG)"
@docker push "$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_TAG)"

# docs regenerates flags in docs for all thanos commands.
.PHONY: docs
Expand Down Expand Up @@ -178,11 +182,17 @@ tarballs-release: $(PROMU)
# test runs all Thanos golang tests against each supported version of Prometheus.
.PHONY: test
test: export GOCACHE= $(TMP_GOPATH)/gocache
test: check-git test-deps
test: export THANOS_TEST_MINIO_PATH= $(MINIO_SERVER)
test: export THANOS_TEST_PROMETHEUS_VERSIONS= $(PROM_VERSIONS)
test: export THANOS_TEST_ALERTMANAGER_PATH= $(ALERTMANAGER)
test: check-git install-deps
@echo ">> install thanos GOOPTS=${GOOPTS}"
# Thanos binary is required by e2e tests.
@go install github.com/thanos-io/thanos/cmd/thanos
# Be careful on GOCACHE. Those tests are sometimes using built Thanos/Prometheus binaries directly. Don't cache those.
@rm -rf ${GOCACHE}
@echo ">> running all tests. Do export THANOS_SKIP_GCS_TESTS='true' or/and THANOS_SKIP_S3_AWS_TESTS='true' or/and THANOS_SKIP_AZURE_TESTS='true' and/or THANOS_SKIP_SWIFT_TESTS='true' and/or THANOS_SKIP_TENCENT_COS_TESTS='true' if you want to skip e2e tests against real store buckets"
THANOS_TEST_PROMETHEUS_VERSIONS="$(PROM_VERSIONS)" THANOS_TEST_ALERTMANAGER_PATH="alertmanager-$(ALERTMANAGER_VERSION)" go test $(shell go list ./... | grep -v /vendor/);
@go test $(shell go list ./... | grep -v /vendor/);

.PHONY: test-only-gcs
test-only-gcs: export THANOS_SKIP_S3_AWS_TESTS = true
Expand All @@ -202,15 +212,23 @@ test-local:
@echo ">> Skipping GCE tests"
$(MAKE) test-only-gcs

# test-deps installs dependency for e2e tets.
# It installs current Thanos, supported versions of Prometheus and alertmanager to test against in e2e.
.PHONY: test-deps
test-deps:
@echo ">> install thanos GOOPTS=${GOOPTS}"
@go install github.com/thanos-io/thanos/cmd/thanos
$(foreach ver,$(PROM_VERSIONS),$(call fetch_go_bin_version,github.com/prometheus/prometheus/cmd/prometheus,$(ver)))
$(call fetch_go_bin_version,github.com/prometheus/alertmanager/cmd/alertmanager,$(ALERTMANAGER_VERSION))
$(call fetch_go_bin_version,github.com/minio/minio,$(MINIO_SERVER_VERSION))
# install-deps installs dependencies for e2e tetss.
# It installs supported versions of Prometheus and alertmanager to test against in e2e.
.PHONY: install-deps
install-deps: $(ALERTMANAGER) $(MINIO_SERVER) $(PROMS)
@echo ">>GOBIN=$(GOBIN)"

.PHONY: docker-ci
# To be run by Thanos maintainer.
docker-ci: install-deps
# Copy all to tmp local dir as this is required by docker.
@rm -rf ./tmp/bin
@mkdir -p ./tmp/bin
@cp -r $(GOBIN)/* ./tmp/bin
@docker build -t thanos-ci -f Dockerfile.thanos-ci .
@echo ">> pushing thanos-ci image"
@docker tag "thanos-ci" "quay.io/thanos/thanos-ci:v0.1.0"
@docker push "quay.io/thanos/thanos-ci:v0.1.0"

# tooling deps. TODO(bwplotka): Pin them all to certain version!
.PHONY: check-git
Expand Down Expand Up @@ -277,6 +295,15 @@ $(GOLANGCILINT):
$(MISSPELL):
$(call fetch_go_bin_version,github.com/client9/misspell/cmd/misspell,$(MISSPELL_VERSION))

$(ALERTMANAGER):
$(call fetch_go_bin_version,github.com/prometheus/alertmanager/cmd/alertmanager,$(ALERTMANAGER_VERSION))

$(MINIO_SERVER):
$(call fetch_go_bin_version,github.com/minio/minio,$(MINIO_SERVER_VERSION))

$(PROMS):
$(foreach ver,$(PROM_VERSIONS),$(call fetch_go_bin_version,github.com/prometheus/prometheus/cmd/prometheus,$(ver)))

$(PROTOC):
@mkdir -p $(TMP_GOPATH)
@echo ">> fetching protoc@${PROTOC_VERSION}"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ Concretely the aims of the project are:
* [Design](https://thanos.io/design.md/)
* [Prom Meetup Slides](https://www.slideshare.net/BartomiejPotka/thanos-global-durable-prometheus-monitoring)
* [Introduction blog post](https://improbable.io/games/blog/thanos-prometheus-at-scale)
* [Benchmarks](https://github.com/thanos-io/thanos/tree/master/benchmark)
* [Proposals](docs/proposals)
* [Integrations](docs/integrations.md)

Expand Down Expand Up @@ -62,10 +61,11 @@ The philosophy of Thanos and our community is borrowing much from UNIX philosoph

## Releases

Master should be stable and usable. Every commit to master builds docker image named `master-<data>-<sha>`.
Master should be stable and usable. Every commit to master builds docker image named `master-<data>-<sha>` in [quay.io/thanos/thanos](https://quay.io/repository/thanos/thanos) and [thanosio/thanos dockerhub (mirror)](https://hub.docker.com/r/thanosio/thanos)

We also perform minor releases every 6 weeks.
During that, we build tarballs for major platforms and docker image ([available from Quay](https://quay.io/repository/thanos/thanos)).

During that, we build tarballs for major platforms and release docker images.

See [release process docs](docs/release-process.md) for details.

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.0-rc.0
0.7.0
8 changes: 4 additions & 4 deletions cmd/thanos/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ func regCommonObjStoreFlags(cmd *kingpin.CmdClause, suffix string, required bool
fileFlagName := fmt.Sprintf("objstore%s.config-file", suffix)
contentFlagName := fmt.Sprintf("objstore%s.config", suffix)

help := fmt.Sprintf("Path to YAML file that contains object store%s configuration.", suffix)
help := fmt.Sprintf("Path to YAML file that contains object store%s configuration. See format details: https://thanos.io/storage.md/#configuration ", suffix)
help = strings.Join(append([]string{help}, extraDesc...), " ")
bucketConfFile := cmd.Flag(fileFlagName, help).PlaceHolder("<bucket.config-yaml-path>").String()

help = fmt.Sprintf("Alternative to '%s' flag. Object store%s configuration in YAML.", fileFlagName, suffix)
help = fmt.Sprintf("Alternative to '%s' flag. Object store%s configuration in YAML. See format details: https://thanos.io/storage.md/#configuration ", fileFlagName, suffix)
help = strings.Join(append([]string{help}, extraDesc...), " ")
bucketConf := cmd.Flag(contentFlagName, help).
PlaceHolder("<bucket.config-yaml>").String()
Expand All @@ -118,10 +118,10 @@ func regCommonTracingFlags(app *kingpin.Application) *pathOrContent {
fileFlagName := fmt.Sprintf("tracing.config-file")
contentFlagName := fmt.Sprintf("tracing.config")

help := fmt.Sprintf("Path to YAML file that contains tracing configuration.")
help := fmt.Sprintf("Path to YAML file that contains tracing configuration. See fomrat details: https://thanos.io/tracing.md/#configuration ")
tracingConfFile := app.Flag(fileFlagName, help).PlaceHolder("<tracing.config-yaml-path>").String()

help = fmt.Sprintf("Alternative to '%s' flag. Tracing configuration in YAML.", fileFlagName)
help = fmt.Sprintf("Alternative to '%s' flag. Tracing configuration in YAML. See format details: https://thanos.io/tracing.md/#configuration", fileFlagName)
tracingConf := app.Flag(contentFlagName, help).PlaceHolder("<tracing.config-yaml>").String()

return &pathOrContent{
Expand Down
77 changes: 42 additions & 35 deletions cmd/thanos/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
"github.com/prometheus/common/version"
"github.com/thanos-io/thanos/pkg/prober"
"github.com/thanos-io/thanos/pkg/runutil"
"github.com/thanos-io/thanos/pkg/store/storepb"
"github.com/thanos-io/thanos/pkg/tracing"
"github.com/thanos-io/thanos/pkg/tracing/client"
"go.uber.org/automaxprocs/maxprocs"
Expand Down Expand Up @@ -244,41 +245,8 @@ func registerMetrics(mux *http.ServeMux, g prometheus.Gatherer) {
mux.Handle("/metrics", promhttp.HandlerFor(g, promhttp.HandlerOpts{}))
}

// defaultGRPCServerOpts returns default gRPC server opts that includes:
// - request histogram
// - tracing
// - panic recovery with panic counter
func defaultGRPCServerOpts(logger log.Logger, reg *prometheus.Registry, tracer opentracing.Tracer, cert, key, clientCA string) ([]grpc.ServerOption, error) {
met := grpc_prometheus.NewServerMetrics()
met.EnableHandlingTimeHistogram(
grpc_prometheus.WithHistogramBuckets([]float64{
0.001, 0.01, 0.05, 0.1, 0.2, 0.4, 0.8, 1.6, 3.2, 6.4,
}),
)

panicsTotal := prometheus.NewCounter(prometheus.CounterOpts{
Name: "thanos_grpc_req_panics_recovered_total",
Help: "Total number of gRPC requests recovered from internal panic.",
})
grpcPanicRecoveryHandler := func(p interface{}) (err error) {
panicsTotal.Inc()
level.Error(logger).Log("msg", "recovered from panic", "panic", p, "stack", debug.Stack())
return status.Errorf(codes.Internal, "%s", p)
}
reg.MustRegister(met, panicsTotal)
opts := []grpc.ServerOption{
grpc.MaxSendMsgSize(math.MaxInt32),
grpc_middleware.WithUnaryServerChain(
met.UnaryServerInterceptor(),
tracing.UnaryServerInterceptor(tracer),
grpc_recovery.UnaryServerInterceptor(grpc_recovery.WithRecoveryHandler(grpcPanicRecoveryHandler)),
),
grpc_middleware.WithStreamServerChain(
met.StreamServerInterceptor(),
tracing.StreamServerInterceptor(tracer),
grpc_recovery.StreamServerInterceptor(grpc_recovery.WithRecoveryHandler(grpcPanicRecoveryHandler)),
),
}
func defaultGRPCServerOpts(logger log.Logger, cert, key, clientCA string) ([]grpc.ServerOption, error) {
opts := []grpc.ServerOption{}

if key == "" && cert == "" {
if clientCA != "" {
Expand Down Expand Up @@ -325,6 +293,45 @@ func defaultGRPCServerOpts(logger log.Logger, reg *prometheus.Registry, tracer o
return append(opts, grpc.Creds(credentials.NewTLS(tlsCfg))), nil
}

func newStoreGRPCServer(logger log.Logger, reg *prometheus.Registry, tracer opentracing.Tracer, srv storepb.StoreServer, opts []grpc.ServerOption) *grpc.Server {
met := grpc_prometheus.NewServerMetrics()
met.EnableHandlingTimeHistogram(
grpc_prometheus.WithHistogramBuckets([]float64{
0.001, 0.01, 0.05, 0.1, 0.2, 0.4, 0.8, 1.6, 3.2, 6.4,
}),
)
panicsTotal := prometheus.NewCounter(prometheus.CounterOpts{
Name: "thanos_grpc_req_panics_recovered_total",
Help: "Total number of gRPC requests recovered from internal panic.",
})
reg.MustRegister(met, panicsTotal)

grpcPanicRecoveryHandler := func(p interface{}) (err error) {
panicsTotal.Inc()
level.Error(logger).Log("msg", "recovered from panic", "panic", p, "stack", debug.Stack())
return status.Errorf(codes.Internal, "%s", p)
}
opts = append(opts,
grpc.MaxSendMsgSize(math.MaxInt32),
grpc_middleware.WithUnaryServerChain(
met.UnaryServerInterceptor(),
tracing.UnaryServerInterceptor(tracer),
grpc_recovery.UnaryServerInterceptor(grpc_recovery.WithRecoveryHandler(grpcPanicRecoveryHandler)),
),
grpc_middleware.WithStreamServerChain(
met.StreamServerInterceptor(),
tracing.StreamServerInterceptor(tracer),
grpc_recovery.StreamServerInterceptor(grpc_recovery.WithRecoveryHandler(grpcPanicRecoveryHandler)),
),
)

s := grpc.NewServer(opts...)
storepb.RegisterStoreServer(s, srv)
met.InitializeMetrics(s)

return s
}

// TODO Remove once all components are migrated to the new defaultHTTPListener.
// metricHTTPListenGroup is a run.Group that servers HTTP endpoint with only Prometheus metrics.
func metricHTTPListenGroup(g *run.Group, logger log.Logger, reg *prometheus.Registry, httpBindAddr string) error {
Expand Down
7 changes: 2 additions & 5 deletions cmd/thanos/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import (
v1 "github.com/thanos-io/thanos/pkg/query/api"
"github.com/thanos-io/thanos/pkg/runutil"
"github.com/thanos-io/thanos/pkg/store"
"github.com/thanos-io/thanos/pkg/store/storepb"
"github.com/thanos-io/thanos/pkg/tracing"
"github.com/thanos-io/thanos/pkg/ui"
"google.golang.org/grpc"
Expand Down Expand Up @@ -441,13 +440,11 @@ func runQuery(
}
logger := log.With(logger, "component", component.Query.String())

opts, err := defaultGRPCServerOpts(logger, reg, tracer, srvCert, srvKey, srvClientCA)
opts, err := defaultGRPCServerOpts(logger, srvCert, srvKey, srvClientCA)
if err != nil {
return errors.Wrapf(err, "build gRPC server")
}

s := grpc.NewServer(opts...)
storepb.RegisterStoreServer(s, proxy)
s := newStoreGRPCServer(logger, reg, tracer, proxy, opts)

g.Add(func() error {
level.Info(logger).Log("msg", "Listening for StoreAPI gRPC", "address", grpcBindAddr)
Expand Down
Loading

0 comments on commit b85ce29

Please sign in to comment.