Fix opentracing configuration when multiple options are configured (#2075)
This commit is contained in:
parent
80462ecdad
commit
33475b7184
2 changed files with 55 additions and 22 deletions
|
|
@ -11,17 +11,7 @@
|
|||
load_module /etc/nginx/modules/ngx_http_modsecurity_module.so;
|
||||
{{ end }}
|
||||
|
||||
{{ if $cfg.EnableOpentracing }}
|
||||
load_module /etc/nginx/modules/ngx_http_opentracing_module.so;
|
||||
{{ end }}
|
||||
|
||||
{{ if (and $cfg.EnableOpentracing (ne $cfg.ZipkinCollectorHost "")) }}
|
||||
load_module /etc/nginx/modules/ngx_http_zipkin_module.so;
|
||||
{{ end }}
|
||||
|
||||
{{ if (and $cfg.EnableOpentracing (ne $cfg.JaegerCollectorHost "")) }}
|
||||
load_module /etc/nginx/modules/ngx_http_jaeger_module.so;
|
||||
{{ end }}
|
||||
{{ buildOpentracingLoad $cfg }}
|
||||
|
||||
daemon off;
|
||||
|
||||
|
|
@ -107,17 +97,8 @@ http {
|
|||
{{ if $cfg.EnableOpentracing }}
|
||||
opentracing on;
|
||||
{{ end }}
|
||||
|
||||
{{ if (and $cfg.EnableOpentracing (ne $cfg.ZipkinCollectorHost "")) }}
|
||||
zipkin_collector_host {{ $cfg.ZipkinCollectorHost }};
|
||||
zipkin_collector_port {{ $cfg.ZipkinCollectorPort }};
|
||||
zipkin_service_name {{ $cfg.ZipkinServiceName }};
|
||||
{{ else if (and $cfg.EnableOpentracing (ne $cfg.JaegerCollectorHost "")) }}
|
||||
jaeger_reporter_local_agent_host_port {{ $cfg.JaegerCollectorHost }}:{{ $cfg.JaegerCollectorPort }};
|
||||
jaeger_service_name {{ $cfg.JaegerServiceName }};
|
||||
jaeger_sampler_type {{ $cfg.JaegerSamplerType }};
|
||||
jaeger_sampler_param {{ $cfg.JaegerSamplerParam }};
|
||||
{{ end }}
|
||||
|
||||
{{ buildOpentracing $cfg }}
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type text/html;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue