ensure all apps use the same host:port scheme for ZIPKIN_SERVICE_ADDR
This commit is contained in:
parent
ad1f47a65a
commit
7200b5319e
6 changed files with 7 additions and 7 deletions
|
@ -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.");
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ function setupTracerAndExporters () {
|
|||
}
|
||||
|
||||
const zipkinOptions = {
|
||||
url: ZIPKIN_SERVICE_ADDR,
|
||||
url: "http://" + ZIPKIN_SERVICE_ADDR + "/api/v2/spans",
|
||||
serviceName: 'paymentservice-server'
|
||||
};
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue