dd-opentracing-cpp icon indicating copy to clipboard operation
dd-opentracing-cpp copied to clipboard

no opentracing context value found for span context key x_b3_traceid for request [request_id]

Open stackempty opened this issue 2 years ago • 9 comments

Hi,

I'm trying out opentracing with nginx-ingress-controller.

After enabling B3 using the following environment variables, the logs are filled with messages like below and the b3 headers are not being propagated.

environment vars

controller:
  extraEnvs:
  - name: DD_TRACE_PROPAGATION_STYLE_EXTRACT
    value: Datadog B3
  - name: DD_PROPAGATION_STYLE_INJECT
    value: Datadog B3
  - name: DD_AGENT_HOST
    valueFrom:
      fieldRef:
        fieldPath: status.hostIP
  - name: DD_ENV
    valueFrom:
      fieldRef:
        fieldPath: metadata.labels['tags.datadoghq.com/env']
  - name: DD_SERVICE
    valueFrom:
      fieldRef:
        fieldPath: metadata.labels['tags.datadoghq.com/service']

controller vars

controller:
  config:
    datadog-collector-host: "$DD_AGENT_HOST"
    datadog-service-name: "$DD_SERVICE"
    datadog-environment: "$DD_ENV"
    enable-opentracing: "true"
    location-snippet: |
      opentracing_trace_locations off;
      opentracing_tag resource.name $uri;
      opentracing_operation_name "$request_method $uri";
      opentracing_propagate_context;

log messages

2023/01/26 11:58:32 [error] 36#36: *10185 no opentracing context value found for span context key x_b3_traceid for request 00007F60CF41E3A0, client: [client_ip_addr], server: [domain].com, request: "POST /path HTTP/1.1", host: "[host].com", referrer: "http://localhost:3000/"
2023/01/26 11:58:32 [error] 36#36: *10185 no opentracing context value found for span context key x_b3_spanid for request 00007F60CF41E3A0, client: [client_ip_addr], server: [domain].com, request: "POST /path HTTP/1.1", host: "[host].com", referrer: "http://localhost:3000/"
2023/01/26 11:58:32 [error] 36#36: *10185 no opentracing context value found for span context key x_b3_sampled for request 00007F60CF41E3A0, client: [client_ip_addr], server: [domain].com, request: "POST /path HTTP/1.1", host: "[host].com", referrer: "http://localhost:3000/"

helm chart version: helm-chart-4.4.2

Could you please help/point me in the right direction?

Thank you

stackempty avatar Jan 26 '23 12:01 stackempty