Update opentracing documentation.
This commit is contained in:
parent
6ea6921562
commit
08b5927cd9
2 changed files with 19 additions and 8 deletions
Binary file not shown.
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 120 KiB |
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue