Datadog Opentracing support - part 2
This commit is part 2 of 2, adding configuration of the Datadog Opentracing module to the controller. Fixes half of #3752
This commit is contained in:
parent
b72dfa99d8
commit
a29c27ed4c
6 changed files with 59 additions and 3 deletions
|
|
@ -836,6 +836,8 @@ func buildOpentracing(input interface{}) string {
|
|||
buf.WriteString("opentracing_load_tracer /usr/local/lib/libzipkin_opentracing.so /etc/nginx/opentracing.json;")
|
||||
} else if cfg.JaegerCollectorHost != "" {
|
||||
buf.WriteString("opentracing_load_tracer /usr/local/lib/libjaegertracing_plugin.so /etc/nginx/opentracing.json;")
|
||||
} else if cfg.DatadogCollectorHost != "" {
|
||||
buf.WriteString("opentracing_load_tracer /usr/local/lib/libdd_opentracing.so /etc/nginx/opentracing.json;")
|
||||
}
|
||||
|
||||
buf.WriteString("\r\n")
|
||||
|
|
|
|||
|
|
@ -1002,6 +1002,17 @@ func TestBuildOpenTracing(t *testing.T) {
|
|||
t.Errorf("Expected '%v' but returned '%v'", expected, actual)
|
||||
}
|
||||
|
||||
cfgDatadog := config.Configuration{
|
||||
EnableOpentracing: true,
|
||||
DatadogCollectorHost: "datadog-host.com",
|
||||
}
|
||||
expected = "opentracing_load_tracer /usr/local/lib/libdd_opentracing.so /etc/nginx/opentracing.json;\r\n"
|
||||
actual = buildOpentracing(cfgDatadog)
|
||||
|
||||
if expected != actual {
|
||||
t.Errorf("Expected '%v' but returned '%v'", expected, actual)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func TestEnforceRegexModifier(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue