Skip to content

Commit

Permalink
Vulture Fixes (#585)
Browse files Browse the repository at this point in the history
* inject org id to pushes

Signed-off-by: Joe Elliott <number101010@gmail.com>

* No really, inject into headers

Signed-off-by: Joe Elliott <number101010@gmail.com>

* Parameterized things

Signed-off-by: Joe Elliott <number101010@gmail.com>
  • Loading branch information
joe-elliott committed Mar 10, 2021
1 parent 98643b3 commit f2a7f3d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
10 changes: 9 additions & 1 deletion cmd/tempo-vulture/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
jaeger_grpc "github.com/jaegertracing/jaeger/cmd/agent/app/reporter/grpc"
thrift "github.com/jaegertracing/jaeger/thrift-gen/jaeger"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/weaveworks/common/user"
"go.uber.org/zap"
"google.golang.org/grpc"
)
Expand Down Expand Up @@ -78,7 +79,14 @@ func main() {
traceIDHigh := rand.Int63()
traceIDLow := rand.Int63()
for i := int64(0); i < generateRandomInt(1, 100); i++ {
err = c.EmitBatch(context.Background(), makeThriftBatch(traceIDHigh, traceIDLow))
ctx := user.InjectOrgID(context.Background(), tempoOrgID)
ctx, err := user.InjectIntoGRPCRequest(ctx)
if err != nil {
glog.Error("error injecting org id ", err)
metricErrorTotal.Inc()
continue
}
err = c.EmitBatch(ctx, makeThriftBatch(traceIDHigh, traceIDLow))
if err != nil {
glog.Error("error pushing batch to Tempo ", err)
metricErrorTotal.Inc()
Expand Down
3 changes: 3 additions & 0 deletions operations/jsonnet/microservices/config.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
},
vulture: {
replicas: 0,
tempoPushUrl: 'http://distributor:14250',
tempoQueryUrl: 'http://query-frontend:3100',
tempoOrgId: '',
},
ballast_size_mbs: '1024',
port: 3100,
Expand Down
6 changes: 3 additions & 3 deletions operations/jsonnet/microservices/vulture.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
]) +
container.withArgs([
'-prometheus-listen-address=:' + port,
'-tempo-push-url=http://distributor',
'-tempo-query-url=http://query-frontend:3100',
'-tempo-push-url=' + $._config.vulture.tempoPushUrl,
'-tempo-query-url=' + $._config.vulture.tempoQueryUrl,
'-logtostderr=true',
'-tempo-org-id=1',
'-tempo-org-id=' + $._config.vulture.tempoOrgId,
]) +
$.util.resourcesRequests('50m', '100Mi') +
$.util.resourcesLimits('100m', '500Mi'),
Expand Down

0 comments on commit f2a7f3d

Please sign in to comment.