jaeger-endpoint configmap attribute
This commit is contained in:
parent
a7fb791132
commit
28280de175
7 changed files with 49 additions and 2 deletions
|
|
@ -1018,7 +1018,7 @@ func buildOpentracing(c interface{}, s interface{}) string {
|
|||
buf.WriteString("opentracing_load_tracer /usr/local/lib64/libdd_opentracing.so /etc/nginx/opentracing.json;")
|
||||
} else if cfg.ZipkinCollectorHost != "" {
|
||||
buf.WriteString("opentracing_load_tracer /usr/local/lib/libzipkin_opentracing_plugin.so /etc/nginx/opentracing.json;")
|
||||
} else if cfg.JaegerCollectorHost != "" {
|
||||
} else if cfg.JaegerCollectorHost != "" || cfg.JaegerEndpoint != "" {
|
||||
buf.WriteString("opentracing_load_tracer /usr/local/lib/libjaegertracing_plugin.so /etc/nginx/opentracing.json;")
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1163,6 +1163,16 @@ func TestBuildOpenTracing(t *testing.T) {
|
|||
t.Errorf("Expected '%v' but returned '%v'", expected, actual)
|
||||
}
|
||||
|
||||
cfgNoHost := config.Configuration{
|
||||
EnableOpentracing: true,
|
||||
}
|
||||
expected = "\r\n"
|
||||
actual = buildOpentracing(cfgNoHost, []*ingress.Server{})
|
||||
|
||||
if expected != actual {
|
||||
t.Errorf("Expected '%v' but returned '%v'", expected, actual)
|
||||
}
|
||||
|
||||
cfgJaeger := config.Configuration{
|
||||
EnableOpentracing: true,
|
||||
JaegerCollectorHost: "jaeger-host.com",
|
||||
|
|
@ -1196,6 +1206,17 @@ func TestBuildOpenTracing(t *testing.T) {
|
|||
t.Errorf("Expected '%v' but returned '%v'", expected, actual)
|
||||
}
|
||||
|
||||
cfgJaegerEndpoint := config.Configuration{
|
||||
EnableOpentracing: true,
|
||||
JaegerEndpoint: "http://jaeger-collector.com:14268/api/traces",
|
||||
}
|
||||
expected = "opentracing_load_tracer /usr/local/lib/libjaegertracing_plugin.so /etc/nginx/opentracing.json;\r\n"
|
||||
actual = buildOpentracing(cfgJaegerEndpoint, []*ingress.Server{})
|
||||
|
||||
if expected != actual {
|
||||
t.Errorf("Expected '%v' but returned '%v'", expected, actual)
|
||||
}
|
||||
|
||||
cfgOpenTracing := config.Configuration{
|
||||
EnableOpentracing: true,
|
||||
DatadogCollectorHost: "datadog-host.com",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue