diff --git a/docs/images/zipkin-demo.png b/docs/images/zipkin-demo.png index c83fcf236..8b5970b72 100644 Binary files a/docs/images/zipkin-demo.png and b/docs/images/zipkin-demo.png differ diff --git a/docs/user-guide/opentracing.md b/docs/user-guide/opentracing.md index 0318e0f80..e5f4cd1cd 100644 --- a/docs/user-guide/opentracing.md +++ b/docs/user-guide/opentracing.md @@ -1,10 +1,18 @@ -# OpenTracing +# Opentracing -Using the third party module [opentracing-contrib/nginx-opentracing](https://github.com/opentracing-contrib/nginx-opentracing) the NGINX ingress controller can configure NGINX to enable [OpenTracing](http://opentracing.io) instrumentation. +Using the third party module [rnburn/nginx-opentracing](https://github.com/rnburn/nginx-opentracing) the NGINX ingress controller can configure NGINX to enable [OpenTracing](http://opentracing.io) instrumentation. By default this feature is disabled. To enable the instrumentation we just need to enable the instrumentation in the configuration configmap and set the host where we should send the traces. +In the [rnburn/zipkin-date-server](https://github.com/rnburn/zipkin-date-server) +github repository is an example of a dockerized date service. Using [minikube](https://github.com/kubernetes/minikube), to install the example and zipkin collector run: + +``` +kubectl create -f https://raw.githubusercontent.com/rnburn/zipkin-date-server/master/kubernetes/zipkin.yaml +kubectl create -f https://raw.githubusercontent.com/rnburn/zipkin-date-server/master/kubernetes/deployment.yaml +``` + In the [aledbf/zipkin-js-example](https://github.com/aledbf/zipkin-js-example) github repository is possible to see a dockerized version of zipkin-js-example with the required Kubernetes descriptors. To install the example and the zipkin collector we just need to run: @@ -15,23 +23,26 @@ kubectl create -f https://raw.githubusercontent.com/aledbf/zipkin-js-example/kub Also we need to configure the NGINX controller configmap with the required values: -```yaml +``` +$ echo ' apiVersion: v1 +kind: ConfigMap data: enable-opentracing: "true" zipkin-collector-host: zipkin.default.svc.cluster.local -kind: ConfigMap metadata: + name: nginx-configuration + namespace: ingress-nginx labels: - k8s-app: nginx-ingress-controller - name: nginx-custom-configuration + app: ingress-nginx +' | kubectl replace -f - ``` Using curl we can generate some traces: ```console -$ curl -v http://$(minikube ip)/api -H 'Host: zipkin-js-example' -$ curl -v http://$(minikube ip)/api -H 'Host: zipkin-js-example' +$ curl -v http://$(minikube ip) +$ curl -v http://$(minikube ip) ``` In the zipkin inteface we can see the details: