opentracing-contrib/nginx-opentracing

Kubernetes health check spams log with "no opentracing context value found"

Opened this issue · 1 comments

We use Nginx with Opentracing in a Kubernetes cluster. It's behind an oauth2-proxy which usually genereates an OpenTracing header for every request. The Kubernetes health checks on /liveness and /readiness come without any OpenTracing support and thus our logs are spammed with:

2021/06/17 09:12:34 [error] 54#54: *587 no opentracing context value found for span context key x_b3_traceid for request 000055D767E61D10 while logging request, client: x.x.x.x, server: xxx.xxx.xxx, request: "GET /liveness HTTP/1.1", host: "x.x.x.x:80"

Our config is:

{
  "service_name": "nginx",
  "sampler": {
    "type": "const",
    "param": 1
  },
  "reporter": {
    "localAgentHostPort": "$opentracing_jaeger_udp_sender_host:6831"
  }
}

and

opentracing_load_tracer /usr/local/lib/libjaegertracing_plugin.so /etc/jaeger-nginx-config.json;
opentracing on;
opentracing_propagate_context;
miry commented

I think it is similar to #157

It is possible to disable opentracing per location.