</code></pre></div></p><p>To enable or disable instrumentation for a single Ingress, use the <code>enable-opentracing</code> annotation: <divclass=highlight><pre><span></span><code>kind: Ingress
</code></pre></div></p><p>We must also set the host to use when uploading traces:</p><p><divclass=highlight><pre><span></span><code>zipkin-collector-host: zipkin.default.svc.cluster.local
</code></pre></div> NOTE: While the option is called <code>jaeger-collector-host</code>, you will need to point this to a <code>jaeger-agent</code>, and not the <code>jaeger-collector</code> component. Alternatively, you can set <code>jaeger-endpoint</code> and specify the full endpoint for uploading traces. This will use TCP and should be used for a collector rather than an agent.</p><p>Next you will need to deploy a distributed tracing system which uses OpenTracing. <ahref=https://github.com/openzipkin/zipkin>Zipkin</a> and <ahref=https://github.com/jaegertracing/jaeger>Jaeger</a> and <ahref=https://github.com/DataDog/dd-opentracing-cpp>Datadog</a> have been tested.</p><p>Other optional configuration options: <divclass=highlight><pre><span></span><code># specifies the name to use for the server span
</code></pre></div></p><p>All these options (including host) allow environment variables, such as <code>$HOSTNAME</code> or <code>$HOST_IP</code>. In the case of Jaeger, if you have a Jaeger agent running on each machine in your cluster, you can use something like <code>$HOST_IP</code> (which can be 'mounted' with the <code>status.hostIP</code> fieldpath, as described <ahref=https://kubernetes.io/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/#capabilities-of-the-downward-api>here</a>) to make sure traces will be sent to the local agent.</p><h2id=examples>Examples<aclass=headerlinkhref=#examplestitle="Permanent link"> ¶</a></h2><p>The following examples show how to deploy and test different distributed tracing systems. These example can be performed using Minikube.</p><h3id=zipkin>Zipkin<aclass=headerlinkhref=#zipkintitle="Permanent link"> ¶</a></h3><p>In the <ahref=https://github.com/rnburn/zipkin-date-server>rnburn/zipkin-date-server</a> GitHub repository is an example of a dockerized date service. To install the example and Zipkin collector run:</p><divclass=highlight><pre><span></span><code>kubectl create -f https://raw.githubusercontent.com/rnburn/zipkin-date-server/master/kubernetes/zipkin.yaml
</code></pre></div><p>Also we need to configure the NGINX controller ConfigMap with the required values:</p><divclass=highlight><pre><span></span><code>$ echo '
</code></pre></div><p>In the Zipkin interface we can see the details: <imgalt="zipkin screenshot"src=../../../images/zipkin-demo.pngtitle="zipkin collector screenshot"></p><h3id=jaeger>Jaeger<aclass=headerlinkhref=#jaegertitle="Permanent link"> ¶</a></h3><ol><li><p>Enable Ingress addon in Minikube: <divclass=highlight><pre><span></span><code>$ minikube addons enable ingress
</code></pre></div></p></li><li><p>Add Minikube IP to /etc/hosts: <divclass=highlight><pre><span></span><code>$ echo "$(minikube ip) example.com" | sudo tee -a /etc/hosts
</code></pre></div></p></li><li><p>Apply a basic Service and Ingress Resource: <divclass=highlight><pre><span></span><code># Create Echoheaders Deployment
</code></pre></div></p></li><li><p>Apply the Jaeger All-In-One Template: <divclass=highlight><pre><span></span><code>$ kubectl apply -f https://raw.githubusercontent.com/jaegertracing/jaeger-kubernetes/master/all-in-one/jaeger-all-in-one-template.yml
</code></pre></div></p></li><li><p>Make a few requests to the Service: <divclass=highlight><pre><span></span><code>$ curl example.com/echo -d "meow"
</code></pre></div></p><p>In the Jaeger interface we can see the details: <imgalt="jaeger screenshot"src=../../../images/jaeger-demo.pngtitle="jaeger collector screenshot"></p></li></ol></article></div></div></main><footerclass=md-footer><divclass=md-footer-nav><navclass="md-footer-nav__inner md-grid"aria-label=Footer><ahref=../modsecurity/class="md-footer-nav__link md-footer-nav__link--prev"rel=prev><divclass="md-footer-nav__button md-icon"><svgxmlns=http://www.w3.org/2000/svgviewbox="0 0 24 24"><pathd="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg></div><divclass=md-footer-nav__title><divclass=md-ellipsis><spanclass=md-footer-nav__direction> Previous </span> ModSecurity Web Application Firewall </div></div></a><ahref=../../../examples/class="md-footer-nav__link md-footer-nav__link--next"rel=next><divclass=md-footer-nav__title><divclass=md-ellipsis><spanclass=md-footer-nav__direction> Next </span> Introduction </div></div><divclass="md-footer-nav__button md-icon"><svgxmlns=http://www.w3.org/2000/svgviewbox="0 0 24 24"><pathd="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg></div></a></nav></div><divclass="md-footer-meta md-typeset"><divclass="md-footer-meta__inner md-grid"><divclass=md-footer-copyright> Made with <ahref=https://squidfunk.github.io/mkdocs-material/target=_blankrel=noopener> Material for MkDocs </a></div></div></div></footer></div><scriptsrc=../../../assets/javascripts/vendor.93c04032.min.js></script><scriptsrc=../../../assets/javascripts/bundle.83e5331e.min.js></script><scriptid=__langtype=application/json>{"clipboard.copy":"Copy to clipboard","clipboard.copied":"Copied to clipboard","search.config.lang":"en","search.config.pipeline":"trimmer, stopWordFilter","search.config.separator":"[\\s\\-]+","search.placeholder":"Search","search.result.placeholder":"Type to start searching","search.result.none":"No matching documents","search.result.one":"1 matching document","search.result.other":"# matching documents","search.result.more.one":"1 more on this page","search.result.more.other":"# more on this page","search.result.term.missing":"Missing"}</script><script>