Reinstate appdash after fix
Peter Bourgon
7 years ago
11 | 11 | "github.com/lightstep/lightstep-tracer-go" |
12 | 12 | stdopentracing "github.com/opentracing/opentracing-go" |
13 | 13 | zipkin "github.com/openzipkin/zipkin-go-opentracing" |
14 | //appdashot "github.com/sourcegraph/appdash/opentracing" | |
14 | appdashot "github.com/sourcegraph/appdash/opentracing" | |
15 | 15 | "golang.org/x/net/context" |
16 | 16 | "google.golang.org/grpc" |
17 | //"sourcegraph.com/sourcegraph/appdash" | |
17 | "sourcegraph.com/sourcegraph/appdash" | |
18 | 18 | |
19 | 19 | "github.com/go-kit/kit/examples/addsvc" |
20 | 20 | grpcclient "github.com/go-kit/kit/examples/addsvc/client/grpc" |
40 | 40 | thriftBufferSize = flag.Int("thrift.buffer.size", 0, "0 for unbuffered") |
41 | 41 | thriftFramed = flag.Bool("thrift.framed", false, "true to enable framing") |
42 | 42 | zipkinAddr = flag.String("zipkin.addr", "", "Enable Zipkin tracing via a Kafka Collector host:port") |
43 | //appdashAddr = flag.String("appdash.addr", "", "Enable Appdash tracing via an Appdash server host:port") | |
44 | lightstepToken = flag.String("lightstep.token", "", "Enable LightStep tracing via a LightStep access token") | |
45 | method = flag.String("method", "sum", "sum, concat") | |
43 | appdashAddr = flag.String("appdash.addr", "", "Enable Appdash tracing via an Appdash server host:port") | |
44 | lightstepToken = flag.String("lightstep.token", "", "Enable LightStep tracing via a LightStep access token") | |
45 | method = flag.String("method", "sum", "sum, concat") | |
46 | 46 | ) |
47 | 47 | flag.Parse() |
48 | 48 | |
71 | 71 | fmt.Fprintf(os.Stderr, "%v\n", err) |
72 | 72 | os.Exit(1) |
73 | 73 | } |
74 | //} else if *appdashAddr != "" { | |
75 | // tracer = appdashot.NewTracer(appdash.NewRemoteCollector(*appdashAddr)) | |
74 | } else if *appdashAddr != "" { | |
75 | tracer = appdashot.NewTracer(appdash.NewRemoteCollector(*appdashAddr)) | |
76 | 76 | } else if *lightstepToken != "" { |
77 | 77 | tracer = lightstep.NewTracer(lightstep.Options{ |
78 | 78 | AccessToken: *lightstepToken, |
16 | 16 | stdopentracing "github.com/opentracing/opentracing-go" |
17 | 17 | zipkin "github.com/openzipkin/zipkin-go-opentracing" |
18 | 18 | stdprometheus "github.com/prometheus/client_golang/prometheus" |
19 | //appdashot "github.com/sourcegraph/appdash/opentracing" | |
19 | appdashot "github.com/sourcegraph/appdash/opentracing" | |
20 | 20 | "golang.org/x/net/context" |
21 | 21 | "google.golang.org/grpc" |
22 | //"sourcegraph.com/sourcegraph/appdash" | |
22 | "sourcegraph.com/sourcegraph/appdash" | |
23 | 23 | |
24 | 24 | "github.com/go-kit/kit/endpoint" |
25 | 25 | "github.com/go-kit/kit/examples/addsvc" |
41 | 41 | thriftBufferSize = flag.Int("thrift.buffer.size", 0, "0 for unbuffered") |
42 | 42 | thriftFramed = flag.Bool("thrift.framed", false, "true to enable framing") |
43 | 43 | zipkinAddr = flag.String("zipkin.addr", "", "Enable Zipkin tracing via a Kafka server host:port") |
44 | //appdashAddr = flag.String("appdash.addr", "", "Enable Appdash tracing via an Appdash server host:port") | |
45 | lightstepToken = flag.String("lightstep.token", "", "Enable LightStep tracing via a LightStep access token") | |
44 | appdashAddr = flag.String("appdash.addr", "", "Enable Appdash tracing via an Appdash server host:port") | |
45 | lightstepToken = flag.String("lightstep.token", "", "Enable LightStep tracing via a LightStep access token") | |
46 | 46 | ) |
47 | 47 | flag.Parse() |
48 | 48 | |
102 | 102 | logger.Log("err", err) |
103 | 103 | os.Exit(1) |
104 | 104 | } |
105 | //} else if *appdashAddr != "" { | |
106 | // logger := log.NewContext(logger).With("tracer", "Appdash") | |
107 | // logger.Log("addr", *appdashAddr) | |
108 | // tracer = appdashot.NewTracer(appdash.NewRemoteCollector(*appdashAddr)) | |
105 | } else if *appdashAddr != "" { | |
106 | logger := log.NewContext(logger).With("tracer", "Appdash") | |
107 | logger.Log("addr", *appdashAddr) | |
108 | tracer = appdashot.NewTracer(appdash.NewRemoteCollector(*appdashAddr)) | |
109 | 109 | } else if *lightstepToken != "" { |
110 | 110 | logger := log.NewContext(logger).With("tracer", "LightStep") |
111 | 111 | logger.Log() // probably don't want to print out the token :) |