Skip to content

Commit

Permalink
Refactor load of tracer load
Browse files Browse the repository at this point in the history
  • Loading branch information
aledbf committed Sep 4, 2020
1 parent 0fa6377 commit ed1c8eb
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions internal/ingress/controller/template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (
"os/exec"
"reflect"
"regexp"
"runtime"
"sort"
"strings"
text_template "text/template"
Expand Down Expand Up @@ -956,16 +955,13 @@ func buildOpentracing(c interface{}, s interface{}) string {
}

buf := bytes.NewBufferString("")
if cfg.ZipkinCollectorHost != "" {
buf.WriteString("opentracing_load_tracer /usr/local/lib/libzipkin_opentracing.so /etc/nginx/opentracing.json;")
} else if cfg.JaegerCollectorHost != "" {
if runtime.GOARCH == "arm" {
buf.WriteString("# Jaeger tracer is not available for ARM https://github.com/jaegertracing/jaeger-client-cpp/issues/151")
} else {
buf.WriteString("opentracing_load_tracer /usr/local/lib/libjaegertracing_plugin.so /etc/nginx/opentracing.json;")
}
} else if cfg.DatadogCollectorHost != "" {

if cfg.DatadogCollectorHost != "" {
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 != "" {
buf.WriteString("opentracing_load_tracer /usr/local/lib/libjaegertracing_plugin.so /etc/nginx/opentracing.json;")
}

buf.WriteString("\r\n")
Expand Down

0 comments on commit ed1c8eb

Please sign in to comment.