Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

align opentracing user-guide with nginx configmap configuration #3215

Merged
merged 1 commit into from
Oct 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions docs/user-guide/third-party-addons/opentracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ Next you will need to deploy a distributed tracing system which uses OpenTracing

Other optional configuration options:
```
# specifies the port to use when uploading traces
# specifies the port to use when uploading traces, Default: 9411
zipkin-collector-port

# specifies the service name to use for any traces created, Default: nginx
zipkin-service-name

# specifies sample rate for any traces created. Default: 1.0
# specifies sample rate for any traces created, Default: 1.0
zipkin-sample-rate

# specifies the port to use when uploading traces
# specifies the port to use when uploading traces, Default: 6831
jaeger-collector-port

# specifies the service name to use for any traces created, Default: nginx
Expand Down Expand Up @@ -97,10 +97,10 @@ In the zipkin interface we can see the details:
```
# Create Echoheaders Deployment
$ kubectl run echoheaders --image=k8s.gcr.io/echoserver:1.4 --replicas=1 --port=8080

# Expose as a Cluster-IP
$ kubectl expose deployment echoheaders --port=80 --target-port=8080 --name=echoheaders-x

# Apply the Ingress Resource
$ echo '
apiVersion: extensions/v1beta1
Expand All @@ -119,14 +119,13 @@ In the zipkin interface we can see the details:
' | kubectl apply -f -
```

4. Enable OpenTracing and set the zipkin-collector-host:
4. Enable OpenTracing and set the jaeger-collector-host:
```
$ echo '
apiVersion: v1
kind: ConfigMap
data:
enable-opentracing: "true"
zipkin-collector-host: zipkin.default.svc.cluster.local
jaeger-collector-host: jaeger-collector.default.svc.cluster.local
metadata:
name: nginx-configuration
Expand All @@ -142,18 +141,18 @@ In the zipkin interface we can see the details:
6. Make a few requests to the Service:
```
$ curl example.com/echo -d "meow"

CLIENT VALUES:
client_address=172.17.0.5
command=POST
real path=/echo
query=nil
request_version=1.1
request_uri=http://example.com:8080/echo

SERVER VALUES:
server_version=nginx: 1.10.0 - lua: 10001

HEADERS RECEIVED:
accept=*/*
connection=close
Expand All @@ -175,9 +174,9 @@ In the zipkin interface we can see the details:
7. View the Jaeger UI:
```
$ minikube service jaeger-query --url

http://192.168.99.100:30183
```

In the jaeger interface we can see the details:
![jaeger screenshot](../../images/jaeger-demo.png "jaeger collector screenshot")
4 changes: 3 additions & 1 deletion internal/ingress/controller/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,14 +437,15 @@ type Configuration struct {
ProxyAddOriginalUriHeader bool `json:"proxy-add-original-uri-header"`

// EnableOpentracing enables the nginx Opentracing extension
// https://github.com/rnburn/nginx-opentracing
// https://github.com/opentracing-contrib/nginx-opentracing
// By default this is disabled
EnableOpentracing bool `json:"enable-opentracing"`

// ZipkinCollectorHost specifies the host to use when uploading traces
ZipkinCollectorHost string `json:"zipkin-collector-host"`

// ZipkinCollectorPort specifies the port to use when uploading traces
// Default: 9411
ZipkinCollectorPort int `json:"zipkin-collector-port"`

// ZipkinServiceName specifies the service name to use for any traces created
Expand All @@ -459,6 +460,7 @@ type Configuration struct {
JaegerCollectorHost string `json:"jaeger-collector-host"`

// JaegerCollectorPort specifies the port to use when uploading traces
// Default: 6831
JaegerCollectorPort int `json:"jaeger-collector-port"`

// JaegerServiceName specifies the service name to use for any traces created
Expand Down