ensure all apps use the same host:port scheme for ZIPKIN_SERVICE_ADDR

This commit is contained in:
prune 2020-01-30 09:26:22 -05:00
parent ad1f47a65a
commit 7200b5319e
No known key found for this signature in database
GPG key ID: 35A2931CBFDC67F6
6 changed files with 7 additions and 7 deletions

View file

@ -271,7 +271,7 @@ public final class AdService {
private static void initZipkin() {
String zipkinAddr = System.getenv("ZIPKIN_SERVICE_ADDR");
if (zipkinAddr != null && !zipkinAddr.isEmpty()) {
String zipkinUrl = String.format("%s", zipkinAddr);
String zipkinUrl = String.format("http://%s/api/v2/spans", zipkinAddr);
// Register Zipkin Tracing.
ZipkinTraceExporter.createAndRegister(zipkinUrl, "adservice");
logger.info("Zipkin initialization complete.");

View file

@ -136,7 +136,7 @@ func initZipkinTracing() {
return
}
reporter := zipkinhttp.NewReporter(svcAddr)
reporter := zipkinhttp.NewReporter(fmt.Sprintf("http://%s/api/v2/spans", svcAddr))
exporter := zipkin.NewExporter(reporter, nil)
trace.RegisterExporter(exporter)

View file

@ -153,8 +153,8 @@ function setupTracerAndExporters () {
}
const zipkinOptions = {
url: ZIPKIN_SERVICE_ADDR,
serviceName: 'paymentservice-server'
url: "http://" + ZIPKIN_SERVICE_ADDR + "/api/v2/spans",
serviceName: 'currencyservice-server'
};
// Creates Zipkin exporter

View file

@ -180,7 +180,7 @@ func initZipkinTracing(log logrus.FieldLogger) {
return
}
reporter := zipkinhttp.NewReporter(svcAddr)
reporter := zipkinhttp.NewReporter(fmt.Sprintf("http://%s/api/v2/spans", svcAddr))
exporter := zipkin.NewExporter(reporter, nil)
trace.RegisterExporter(exporter)

View file

@ -41,7 +41,7 @@ function setupTracerAndExporters () {
}
const zipkinOptions = {
url: ZIPKIN_SERVICE_ADDR,
url: "http://" + ZIPKIN_SERVICE_ADDR + "/api/v2/spans",
serviceName: 'paymentservice-server'
};

View file

@ -172,7 +172,7 @@ func initZipkinTracing() {
return
}
reporter := zipkinhttp.NewReporter(svcAddr)
reporter := zipkinhttp.NewReporter(fmt.Sprintf("http://%s/api/v2/spans", svcAddr))
exporter := zipkin.NewExporter(reporter, nil)
trace.RegisterExporter(exporter)