Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-1660

Issues with the OpenTracing forward header

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • 2.3 GA
    • Gateway
    • None

      There are some issues with setting the OPENTRACING_HEADER_FORWARD value.

      1. The docs say the env var is called OPENTRACING_HEADER_FORWARD: https://github.com/3scale/apicast/blob/01c5d36/doc/parameters.md#opentracing_header_forward

      However, when setting this env var, it doesn't change anything. When starting the container with OPENTRACING_TRACER=jaeger, the header uber-trace-id is added.

      2. Despite what docs say, the actual value that seems to be used in the code is OPENTRACING_FORWARD_HEADER https://github.com/3scale/apicast/blob/ad56f56/gateway/src/apicast/cli/environment.lua#L116

      When trying to set this env var, by adding -e OPENTRACING_TRACER=jaeger -e OPENTRACING_FORWARD_HEADER=my-tracing-header to the docker run command, the following error is thrown by APIcast:

      2018/12/07 08:38:21 [debug] 17#17: *2 [lua] env.lua:86: fetch(): env: OPENTRACING_FORWARD_HEADER = my-tracing-header
      ERROR: /usr/local/share/lua/5.1/liquid.lua:1887: Liquid runtime error, stoped at line_num: 46 cols:102. INFO: filter invoke fails
      stack traceback:
        /usr/local/share/lua/5.1/liquid.lua:1887: in function 'raise_error'
        /usr/local/share/lua/5.1/liquid.lua:2384: in function 'visit'
        /usr/local/share/lua/5.1/liquid.lua:1999: in function 'visit'
        /usr/local/share/lua/5.1/liquid.lua:1975: in function 'visit'
        /usr/local/share/lua/5.1/liquid.lua:2458: in function 'visit'
        /usr/local/share/lua/5.1/liquid.lua:1975: in function 'visit'
        /usr/local/share/lua/5.1/liquid.lua:1975: in function 'interpret'
        /usr/local/share/lua/5.1/liquid.lua:2410: in function 'visit'
        /usr/local/share/lua/5.1/liquid.lua:1975: in function 'render'
        /opt/app-root/src/src/apicast/cli/command/start.lua:56: in function 'nginx_config'
        /opt/app-root/src/src/apicast/cli/command/start.lua:157: in function 'start'
        /opt/app-root/src/src/apicast/cli.lua:49: in function </opt/app-root/src/src/apicast/cli.lua:29>
        /tmp/4nKyUHFgIG:60: in function 'file_gen'
        init_worker_by_lua:51: in function <init_worker_by_lua:49>
        [C]: in function 'xpcall'
        init_worker_by_lua:58: in function <init_worker_by_lua:56>
      loading staging environment configuration: /opt/app-root/src/config/staging.lua
      

              Unassigned Unassigned
              rhn-support-dmayorov Daria Mayorova
              Eloy Coto Eloy Coto (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: