Merge pull request #3215 from hchenxa/hchenxa
align opentracing user-guide with nginx configmap configuration
This commit is contained in:
commit
3038da8719
2 changed files with 14 additions and 13 deletions
|
@ -25,16 +25,16 @@ Next you will need to deploy a distributed tracing system which uses OpenTracing
|
||||||
|
|
||||||
Other optional configuration options:
|
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
|
zipkin-collector-port
|
||||||
|
|
||||||
# specifies the service name to use for any traces created, Default: nginx
|
# specifies the service name to use for any traces created, Default: nginx
|
||||||
zipkin-service-name
|
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
|
zipkin-sample-rate
|
||||||
|
|
||||||
# specifies the port to use when uploading traces
|
# specifies the port to use when uploading traces, Default: 6831
|
||||||
jaeger-collector-port
|
jaeger-collector-port
|
||||||
|
|
||||||
# specifies the service name to use for any traces created, Default: nginx
|
# specifies the service name to use for any traces created, Default: nginx
|
||||||
|
@ -97,10 +97,10 @@ In the zipkin interface we can see the details:
|
||||||
```
|
```
|
||||||
# Create Echoheaders Deployment
|
# Create Echoheaders Deployment
|
||||||
$ kubectl run echoheaders --image=k8s.gcr.io/echoserver:1.4 --replicas=1 --port=8080
|
$ kubectl run echoheaders --image=k8s.gcr.io/echoserver:1.4 --replicas=1 --port=8080
|
||||||
|
|
||||||
# Expose as a Cluster-IP
|
# Expose as a Cluster-IP
|
||||||
$ kubectl expose deployment echoheaders --port=80 --target-port=8080 --name=echoheaders-x
|
$ kubectl expose deployment echoheaders --port=80 --target-port=8080 --name=echoheaders-x
|
||||||
|
|
||||||
# Apply the Ingress Resource
|
# Apply the Ingress Resource
|
||||||
$ echo '
|
$ echo '
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: extensions/v1beta1
|
||||||
|
@ -119,14 +119,13 @@ In the zipkin interface we can see the details:
|
||||||
' | kubectl apply -f -
|
' | kubectl apply -f -
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Enable OpenTracing and set the zipkin-collector-host:
|
4. Enable OpenTracing and set the jaeger-collector-host:
|
||||||
```
|
```
|
||||||
$ echo '
|
$ echo '
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
data:
|
data:
|
||||||
enable-opentracing: "true"
|
enable-opentracing: "true"
|
||||||
zipkin-collector-host: zipkin.default.svc.cluster.local
|
|
||||||
jaeger-collector-host: jaeger-collector.default.svc.cluster.local
|
jaeger-collector-host: jaeger-collector.default.svc.cluster.local
|
||||||
metadata:
|
metadata:
|
||||||
name: nginx-configuration
|
name: nginx-configuration
|
||||||
|
@ -142,7 +141,7 @@ In the zipkin interface we can see the details:
|
||||||
6. Make a few requests to the Service:
|
6. Make a few requests to the Service:
|
||||||
```
|
```
|
||||||
$ curl example.com/echo -d "meow"
|
$ curl example.com/echo -d "meow"
|
||||||
|
|
||||||
CLIENT VALUES:
|
CLIENT VALUES:
|
||||||
client_address=172.17.0.5
|
client_address=172.17.0.5
|
||||||
command=POST
|
command=POST
|
||||||
|
@ -150,10 +149,10 @@ In the zipkin interface we can see the details:
|
||||||
query=nil
|
query=nil
|
||||||
request_version=1.1
|
request_version=1.1
|
||||||
request_uri=http://example.com:8080/echo
|
request_uri=http://example.com:8080/echo
|
||||||
|
|
||||||
SERVER VALUES:
|
SERVER VALUES:
|
||||||
server_version=nginx: 1.10.0 - lua: 10001
|
server_version=nginx: 1.10.0 - lua: 10001
|
||||||
|
|
||||||
HEADERS RECEIVED:
|
HEADERS RECEIVED:
|
||||||
accept=*/*
|
accept=*/*
|
||||||
connection=close
|
connection=close
|
||||||
|
@ -175,9 +174,9 @@ In the zipkin interface we can see the details:
|
||||||
7. View the Jaeger UI:
|
7. View the Jaeger UI:
|
||||||
```
|
```
|
||||||
$ minikube service jaeger-query --url
|
$ minikube service jaeger-query --url
|
||||||
|
|
||||||
http://192.168.99.100:30183
|
http://192.168.99.100:30183
|
||||||
```
|
```
|
||||||
|
|
||||||
In the jaeger interface we can see the details:
|
In the jaeger interface we can see the details:
|
||||||

|

|
||||||
|
|
|
@ -437,7 +437,7 @@ type Configuration struct {
|
||||||
ProxyAddOriginalUriHeader bool `json:"proxy-add-original-uri-header"`
|
ProxyAddOriginalUriHeader bool `json:"proxy-add-original-uri-header"`
|
||||||
|
|
||||||
// EnableOpentracing enables the nginx Opentracing extension
|
// EnableOpentracing enables the nginx Opentracing extension
|
||||||
// https://github.com/rnburn/nginx-opentracing
|
// https://github.com/opentracing-contrib/nginx-opentracing
|
||||||
// By default this is disabled
|
// By default this is disabled
|
||||||
EnableOpentracing bool `json:"enable-opentracing"`
|
EnableOpentracing bool `json:"enable-opentracing"`
|
||||||
|
|
||||||
|
@ -445,6 +445,7 @@ type Configuration struct {
|
||||||
ZipkinCollectorHost string `json:"zipkin-collector-host"`
|
ZipkinCollectorHost string `json:"zipkin-collector-host"`
|
||||||
|
|
||||||
// ZipkinCollectorPort specifies the port to use when uploading traces
|
// ZipkinCollectorPort specifies the port to use when uploading traces
|
||||||
|
// Default: 9411
|
||||||
ZipkinCollectorPort int `json:"zipkin-collector-port"`
|
ZipkinCollectorPort int `json:"zipkin-collector-port"`
|
||||||
|
|
||||||
// ZipkinServiceName specifies the service name to use for any traces created
|
// ZipkinServiceName specifies the service name to use for any traces created
|
||||||
|
@ -459,6 +460,7 @@ type Configuration struct {
|
||||||
JaegerCollectorHost string `json:"jaeger-collector-host"`
|
JaegerCollectorHost string `json:"jaeger-collector-host"`
|
||||||
|
|
||||||
// JaegerCollectorPort specifies the port to use when uploading traces
|
// JaegerCollectorPort specifies the port to use when uploading traces
|
||||||
|
// Default: 6831
|
||||||
JaegerCollectorPort int `json:"jaeger-collector-port"`
|
JaegerCollectorPort int `json:"jaeger-collector-port"`
|
||||||
|
|
||||||
// JaegerServiceName specifies the service name to use for any traces created
|
// JaegerServiceName specifies the service name to use for any traces created
|
||||||
|
|
Loading…
Reference in a new issue