Skip to content

Commit

Permalink
Update tracing and metrics dependencies (#190)
Browse files Browse the repository at this point in the history
Signed-off-by: Paschalis Tsilias <p.tsilias@thebeat.co>
  • Loading branch information
tpaschalis committed Apr 7, 2020
1 parent 2e5b02c commit 776b5c6
Show file tree
Hide file tree
Showing 312 changed files with 57,052 additions and 41,836 deletions.
4 changes: 2 additions & 2 deletions client/http/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
func TestTracedClient_Do(t *testing.T) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
assert.Equal(t, "true", r.Header.Get("Mockpfx-Ids-Sampled"))
assert.Equal(t, "46", r.Header.Get("Mockpfx-Ids-Spanid"))
assert.Equal(t, "43", r.Header.Get("Mockpfx-Ids-Traceid"))
assert.NotEmpty(t, r.Header.Get("Mockpfx-Ids-Spanid"))
assert.NotEmpty(t, r.Header.Get("Mockpfx-Ids-Traceid"))
fmt.Fprintln(w, "Hello, client")
}))
defer ts.Close()
Expand Down
2 changes: 1 addition & 1 deletion examples/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ services:
aliases:
- prometheus
volumes:
- ${PWD}examples/config/prometheus.yml:/etc/prometheus/prometheus.yml
- ${PWD}/config/prometheus.yml:/etc/prometheus/prometheus.yml
expose:
- "9090"
ports:
Expand Down
15 changes: 6 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,16 @@ require (
github.com/opencontainers/image-spec v1.0.1 // indirect
github.com/opencontainers/runc v0.1.1 // indirect
github.com/opentracing-contrib/go-stdlib v0.0.0-20180313041242-367231351874
github.com/opentracing/opentracing-go v0.0.0-20180606204148-bd9c31933947
github.com/opentracing/opentracing-go v1.1.0
github.com/ory/dockertest v3.3.5+incompatible
github.com/prometheus/client_golang v0.9.1
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4
github.com/prometheus/common v0.2.0 // indirect
github.com/prometheus/procfs v0.0.0-20190129233650-316cf8ccfec5 // indirect
github.com/prometheus/client_golang v1.5.1
github.com/prometheus/client_model v0.2.0
github.com/rs/zerolog v1.5.0
github.com/streadway/amqp v0.0.0-20180315184602-8e4aba63da9f
github.com/stretchr/testify v1.4.0
github.com/uber-go/atomic v1.3.2 // indirect
github.com/uber/jaeger-client-go v2.14.0+incompatible
github.com/uber/jaeger-lib v1.5.0
go.uber.org/atomic v1.3.2 // indirect
github.com/uber/jaeger-client-go v2.22.1+incompatible
github.com/uber/jaeger-lib v2.2.0+incompatible
go.uber.org/atomic v1.6.0 // indirect
google.golang.org/grpc v1.27.1
gotest.tools v2.2.0+incompatible // indirect
)
Expand Down
99 changes: 59 additions & 40 deletions go.sum

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion trace/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/opentracing/opentracing-go/ext"
"github.com/uber/jaeger-client-go/config"
"github.com/uber/jaeger-client-go/rpcmetrics"
"github.com/uber/jaeger-lib/metrics"
"github.com/uber/jaeger-lib/metrics/prometheus"
)

Expand Down Expand Up @@ -48,9 +49,10 @@ func Setup(name, ver, agent, typ string, prm float64) error {
}
time.Sleep(100 * time.Millisecond)
metricsFactory := prometheus.New()
opts := metrics.NSOptions{Name: name, Tags: nil}
tr, clsTemp, err := cfg.NewTracer(
config.Logger(jaegerLoggerAdapter{}),
config.Observer(rpcmetrics.NewObserver(metricsFactory.Namespace(name, nil), rpcmetrics.DefaultNameNormalizer)),
config.Observer(rpcmetrics.NewObserver(metricsFactory.Namespace(opts), rpcmetrics.DefaultNameNormalizer)),
)
if err != nil {
return fmt.Errorf("cannot initialize jaeger tracer: %w", err)
Expand Down
8 changes: 8 additions & 0 deletions vendor/github.com/cespare/xxhash/v2/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions vendor/github.com/cespare/xxhash/v2/LICENSE.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

67 changes: 67 additions & 0 deletions vendor/github.com/cespare/xxhash/v2/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions vendor/github.com/cespare/xxhash/v2/go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.
Loading

0 comments on commit 776b5c6

Please sign in to comment.