Skip to content

Commit

Permalink
feat sidecar: added info log about successful load of external labels (
Browse files Browse the repository at this point in the history
…#965)

Signed-off-by: Martin Chodur <[email protected]>
  • Loading branch information
FUSAKLA authored and bwplotka committed Mar 23, 2019
1 parent cf6a67a commit f251948
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmd/thanos/sidecar.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ import (
"github.com/improbable-eng/thanos/pkg/store"
"github.com/improbable-eng/thanos/pkg/store/storepb"
"github.com/oklog/run"
"github.com/opentracing/opentracing-go"
opentracing "github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/tsdb/labels"
"google.golang.org/grpc"
"gopkg.in/alecthomas/kingpin.v2"
kingpin "gopkg.in/alecthomas/kingpin.v2"
)

func registerSidecar(m map[string]setupFunc, app *kingpin.Application, name string) {
Expand Down Expand Up @@ -137,6 +137,10 @@ func runSidecar(
return err
}

level.Info(logger).Log(
"msg", "successfully loaded prometheus external labels",
"external_labels", m.Labels().String(),
)
promUp.Set(1)
lastHeartbeat.Set(float64(time.Now().UnixNano()) / 1e9)
return nil
Expand Down

0 comments on commit f251948

Please sign in to comment.