feat: remove all trace of opentracing support
This commit is contained in:
parent
0c3d52bade
commit
31d9b9cf23
8 changed files with 0 additions and 565 deletions
|
@ -477,20 +477,6 @@ Do not try to edit it manually.
|
|||
- [should include opentelemetry_trust_incoming_spans on directive when enabled](https://github.com/kubernetes/ingress-nginx/tree/main//test/e2e/settings/opentelemetry.go#L76)
|
||||
- [should not exists opentelemetry_operation_name directive when is empty](https://github.com/kubernetes/ingress-nginx/tree/main//test/e2e/settings/opentelemetry.go#L91)
|
||||
- [should exists opentelemetry_operation_name directive when is configured](https://github.com/kubernetes/ingress-nginx/tree/main//test/e2e/settings/opentelemetry.go#L106)
|
||||
### [Configure OpenTracing](https://github.com/kubernetes/ingress-nginx/tree/main//test/e2e/settings/opentracing.go#L52)
|
||||
- [should not exists opentracing directive](https://github.com/kubernetes/ingress-nginx/tree/main//test/e2e/settings/opentracing.go#L62)
|
||||
- [should exists opentracing directive when is enabled](https://github.com/kubernetes/ingress-nginx/tree/main//test/e2e/settings/opentracing.go#L75)
|
||||
- [should include opentracing_trust_incoming_span off directive when disabled](https://github.com/kubernetes/ingress-nginx/tree/main//test/e2e/settings/opentracing.go#L89)
|
||||
- [should not exists opentracing_operation_name directive when is empty](https://github.com/kubernetes/ingress-nginx/tree/main//test/e2e/settings/opentracing.go#L104)
|
||||
- [should exists opentracing_operation_name directive when is configured](https://github.com/kubernetes/ingress-nginx/tree/main//test/e2e/settings/opentracing.go#L119)
|
||||
- [should not exists opentracing_location_operation_name directive when is empty](https://github.com/kubernetes/ingress-nginx/tree/main//test/e2e/settings/opentracing.go#L134)
|
||||
- [should exists opentracing_location_operation_name directive when is configured](https://github.com/kubernetes/ingress-nginx/tree/main//test/e2e/settings/opentracing.go#L149)
|
||||
- [should enable opentracing using zipkin](https://github.com/kubernetes/ingress-nginx/tree/main//test/e2e/settings/opentracing.go#L164)
|
||||
- [should enable opentracing using jaeger](https://github.com/kubernetes/ingress-nginx/tree/main//test/e2e/settings/opentracing.go#L176)
|
||||
- [should enable opentracing using jaeger with sampler host](https://github.com/kubernetes/ingress-nginx/tree/main//test/e2e/settings/opentracing.go#L188)
|
||||
- [should propagate the w3c header when configured with jaeger](https://github.com/kubernetes/ingress-nginx/tree/main//test/e2e/settings/opentracing.go#L201)
|
||||
- [should enable opentracing using jaeger with an HTTP endpoint](https://github.com/kubernetes/ingress-nginx/tree/main//test/e2e/settings/opentracing.go#L232)
|
||||
- [should enable opentracing using datadog](https://github.com/kubernetes/ingress-nginx/tree/main//test/e2e/settings/opentracing.go#L245)
|
||||
### [plugins](https://github.com/kubernetes/ingress-nginx/tree/main//test/e2e/settings/plugins.go#L28)
|
||||
- [should exist a x-hello-world header](https://github.com/kubernetes/ingress-nginx/tree/main//test/e2e/settings/plugins.go#L35)
|
||||
### [[Security] Pod Security Policies](https://github.com/kubernetes/ingress-nginx/tree/main//test/e2e/settings/pod_security_policy.go#L41)
|
||||
|
|
|
@ -207,7 +207,6 @@ mime.types
|
|||
modsecurity
|
||||
modules
|
||||
nginx.conf
|
||||
opentracing.json
|
||||
opentelemetry.toml
|
||||
owasp-modsecurity-crs
|
||||
template
|
||||
|
|
|
@ -121,8 +121,6 @@ You can add these Kubernetes annotations to specific Ingress objects to customiz
|
|||
|[nginx.ingress.kubernetes.io/ssl-prefer-server-ciphers](#ssl-ciphers)|"true" or "false"|
|
||||
|[nginx.ingress.kubernetes.io/connection-proxy-header](#connection-proxy-header)|string|
|
||||
|[nginx.ingress.kubernetes.io/enable-access-log](#enable-access-log)|"true" or "false"|
|
||||
|[nginx.ingress.kubernetes.io/enable-opentracing](#enable-opentracing)|"true" or "false"|
|
||||
|[nginx.ingress.kubernetes.io/opentracing-trust-incoming-span](#opentracing-trust-incoming-span)|"true" or "false"|
|
||||
|[nginx.ingress.kubernetes.io/enable-opentelemetry](#enable-opentelemetry)|"true" or "false"|
|
||||
|[nginx.ingress.kubernetes.io/opentelemetry-trust-incoming-span](#opentelemetry-trust-incoming-spans)|"true" or "false"|
|
||||
|[nginx.ingress.kubernetes.io/use-regex](#use-regex)|bool|
|
||||
|
@ -823,24 +821,6 @@ Note that rewrite logs are sent to the error_log file at the notice level. To en
|
|||
nginx.ingress.kubernetes.io/enable-rewrite-log: "true"
|
||||
```
|
||||
|
||||
### Enable Opentracing
|
||||
|
||||
Opentracing can be enabled or disabled globally through the ConfigMap but this will sometimes need to be overridden
|
||||
to enable it or disable it for a specific ingress (e.g. to turn off tracing of external health check endpoints)
|
||||
|
||||
```yaml
|
||||
nginx.ingress.kubernetes.io/enable-opentracing: "true"
|
||||
```
|
||||
|
||||
### Opentracing Trust Incoming Span
|
||||
|
||||
The option to trust incoming trace spans can be enabled or disabled globally through the ConfigMap but this will
|
||||
sometimes need to be overridden to enable it or disable it for a specific ingress (e.g. only enable on a private endpoint)
|
||||
|
||||
```yaml
|
||||
nginx.ingress.kubernetes.io/opentracing-trust-incoming-span: "true"
|
||||
```
|
||||
|
||||
### Enable Opentelemetry
|
||||
|
||||
Opentelemetry can be enabled or disabled globally through the ConfigMap but this will sometimes need to be overridden
|
||||
|
|
|
@ -134,33 +134,6 @@ The following table shows a configuration option's name, type, and the default v
|
|||
|[compute-full-forwarded-for](#compute-full-forwarded-for)|bool|"false"||
|
||||
|[proxy-add-original-uri-header](#proxy-add-original-uri-header)|bool|"false"||
|
||||
|[generate-request-id](#generate-request-id)|bool|"true"||
|
||||
|[enable-opentracing](#enable-opentracing)|bool|"false"||
|
||||
|[opentracing-operation-name](#opentracing-operation-name)|string|""||
|
||||
|[opentracing-location-operation-name](#opentracing-location-operation-name)|string|""||
|
||||
|[zipkin-collector-host](#zipkin-collector-host)|string|""||
|
||||
|[zipkin-collector-port](#zipkin-collector-port)|int|9411||
|
||||
|[zipkin-service-name](#zipkin-service-name)|string|"nginx"||
|
||||
|[zipkin-sample-rate](#zipkin-sample-rate)|float|1.0||
|
||||
|[jaeger-collector-host](#jaeger-collector-host)|string|""||
|
||||
|[jaeger-collector-port](#jaeger-collector-port)|int|6831||
|
||||
|[jaeger-endpoint](#jaeger-endpoint)|string|""||
|
||||
|[jaeger-service-name](#jaeger-service-name)|string|"nginx"||
|
||||
|[jaeger-propagation-format](#jaeger-propagation-format)|string|"jaeger"||
|
||||
|[jaeger-sampler-type](#jaeger-sampler-type)|string|"const"||
|
||||
|[jaeger-sampler-param](#jaeger-sampler-param)|string|"1"||
|
||||
|[jaeger-sampler-host](#jaeger-sampler-host)|string|"http://127.0.0.1"||
|
||||
|[jaeger-sampler-port](#jaeger-sampler-port)|int|5778||
|
||||
|[jaeger-trace-context-header-name](#jaeger-trace-context-header-name)|string|uber-trace-id||
|
||||
|[jaeger-debug-header](#jaeger-debug-header)|string|uber-debug-id||
|
||||
|[jaeger-baggage-header](#jaeger-baggage-header)|string|jaeger-baggage||
|
||||
|[jaeger-trace-baggage-header-prefix](#jaeger-trace-baggage-header-prefix)|string|uberctx-||
|
||||
|[datadog-collector-host](#datadog-collector-host)|string|""||
|
||||
|[datadog-collector-port](#datadog-collector-port)|int|8126||
|
||||
|[datadog-service-name](#datadog-service-name)|string|"nginx"||
|
||||
|[datadog-environment](#datadog-environment)|string|"prod"||
|
||||
|[datadog-operation-name-override](#datadog-operation-name-override)|string|"nginx.handle"||
|
||||
|[datadog-priority-sampling](#datadog-priority-sampling)|bool|"true"||
|
||||
|[datadog-sample-rate](#datadog-sample-rate)|float|1.0||
|
||||
|[enable-opentelemetry](#enable-opentelemetry)|bool|"false"||
|
||||
|[opentelemetry-trust-incoming-span](#opentelemetry-trust-incoming-span)|bool|"true"||
|
||||
|[opentelemetry-operation-name](#opentelemetry-operation-name)|string|""||
|
||||
|
@ -945,125 +918,6 @@ Adds an X-Original-Uri header with the original request URI to the backend reque
|
|||
|
||||
Ensures that X-Request-ID is defaulted to a random value, if no X-Request-ID is present in the request
|
||||
|
||||
## enable-opentracing
|
||||
|
||||
Enables the nginx Opentracing extension. _**default:**_ is disabled
|
||||
|
||||
_References:_
|
||||
[https://github.com/opentracing-contrib/nginx-opentracing](https://github.com/opentracing-contrib/nginx-opentracing)
|
||||
|
||||
## opentracing-operation-name
|
||||
|
||||
Specifies a custom name for the server span. _**default:**_ is empty
|
||||
|
||||
For example, set to "HTTP $request_method $uri".
|
||||
|
||||
## opentracing-location-operation-name
|
||||
|
||||
Specifies a custom name for the location span. _**default:**_ is empty
|
||||
|
||||
For example, set to "HTTP $request_method $uri".
|
||||
|
||||
## zipkin-collector-host
|
||||
|
||||
Specifies the host to use when uploading traces. It must be a valid URL.
|
||||
|
||||
## zipkin-collector-port
|
||||
|
||||
Specifies the port to use when uploading traces. _**default:**_ 9411
|
||||
|
||||
## zipkin-service-name
|
||||
|
||||
Specifies the service name to use for any traces created. _**default:**_ nginx
|
||||
|
||||
## zipkin-sample-rate
|
||||
|
||||
Specifies sample rate for any traces created. _**default:**_ 1.0
|
||||
|
||||
## jaeger-collector-host
|
||||
|
||||
Specifies the host to use when uploading traces. It must be a valid URL.
|
||||
|
||||
## jaeger-collector-port
|
||||
|
||||
Specifies the port to use when uploading traces. _**default:**_ 6831
|
||||
|
||||
## jaeger-endpoint
|
||||
|
||||
Specifies the endpoint to use when uploading traces to a collector. This takes priority over `jaeger-collector-host` if both are specified.
|
||||
|
||||
## jaeger-service-name
|
||||
|
||||
Specifies the service name to use for any traces created. _**default:**_ nginx
|
||||
|
||||
## jaeger-propagation-format
|
||||
|
||||
Specifies the traceparent/tracestate propagation format. _**default:**_ jaeger
|
||||
|
||||
## jaeger-sampler-type
|
||||
|
||||
Specifies the sampler to be used when sampling traces. The available samplers are: const, probabilistic, ratelimiting, remote. _**default:**_ const
|
||||
|
||||
## jaeger-sampler-param
|
||||
|
||||
Specifies the argument to be passed to the sampler constructor. Must be a number.
|
||||
For const this should be 0 to never sample and 1 to always sample. _**default:**_ 1
|
||||
|
||||
## jaeger-sampler-host
|
||||
|
||||
Specifies the custom remote sampler host to be passed to the sampler constructor. Must be a valid URL.
|
||||
Leave blank to use default value (localhost). _**default:**_ http://127.0.0.1
|
||||
|
||||
## jaeger-sampler-port
|
||||
|
||||
Specifies the custom remote sampler port to be passed to the sampler constructor. Must be a number. _**default:**_ 5778
|
||||
|
||||
## jaeger-trace-context-header-name
|
||||
|
||||
Specifies the header name used for passing trace context. _**default:**_ uber-trace-id
|
||||
|
||||
## jaeger-debug-header
|
||||
|
||||
Specifies the header name used for force sampling. _**default:**_ jaeger-debug-id
|
||||
|
||||
## jaeger-baggage-header
|
||||
|
||||
Specifies the header name used to submit baggage if there is no root span. _**default:**_ jaeger-baggage
|
||||
|
||||
## jaeger-tracer-baggage-header-prefix
|
||||
|
||||
Specifies the header prefix used to propagate baggage. _**default:**_ uberctx-
|
||||
|
||||
## datadog-collector-host
|
||||
|
||||
Specifies the datadog agent host to use when uploading traces. It must be a valid URL.
|
||||
|
||||
## datadog-collector-port
|
||||
|
||||
Specifies the port to use when uploading traces. _**default:**_ 8126
|
||||
|
||||
## datadog-service-name
|
||||
|
||||
Specifies the service name to use for any traces created. _**default:**_ nginx
|
||||
|
||||
## datadog-environment
|
||||
|
||||
Specifies the environment this trace belongs to. _**default:**_ prod
|
||||
|
||||
## datadog-operation-name-override
|
||||
|
||||
Overrides the operation name to use for any traces crated. _**default:**_ nginx.handle
|
||||
|
||||
## datadog-priority-sampling
|
||||
|
||||
Specifies to use client-side sampling.
|
||||
If true disables client-side sampling (thus ignoring `sample_rate`) and enables distributed priority sampling, where traces are sampled based on a combination of user-assigned priorities and configuration from the agent. _**default:**_ true
|
||||
|
||||
## datadog-sample-rate
|
||||
|
||||
Specifies sample rate for any traces created.
|
||||
This is effective only when `datadog-priority-sampling` is `false` _**default:**_ 1.0
|
||||
|
||||
## enable-opentelemetry
|
||||
|
||||
Enables the nginx OpenTelemetry extension. _**default:**_ is disabled
|
||||
|
|
|
@ -1,263 +0,0 @@
|
|||
# OpenTracing
|
||||
|
||||
Enables requests served by NGINX for distributed tracing via The OpenTracing Project.
|
||||
|
||||
Using the third party module [opentracing-contrib/nginx-opentracing](https://github.com/opentracing-contrib/nginx-opentracing) the Ingress-Nginx Controller can configure NGINX to enable [OpenTracing](http://opentracing.io) instrumentation.
|
||||
By default this feature is disabled.
|
||||
|
||||
## Usage
|
||||
|
||||
To enable the instrumentation we must enable OpenTracing in the configuration ConfigMap:
|
||||
```
|
||||
data:
|
||||
enable-opentracing: "true"
|
||||
```
|
||||
|
||||
To enable or disable instrumentation for a single Ingress, use
|
||||
the `enable-opentracing` annotation:
|
||||
```
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/enable-opentracing: "true"
|
||||
```
|
||||
|
||||
We must also set the host to use when uploading traces:
|
||||
|
||||
```
|
||||
zipkin-collector-host: zipkin.default.svc.cluster.local
|
||||
jaeger-collector-host: jaeger-agent.default.svc.cluster.local
|
||||
datadog-collector-host: datadog-agent.default.svc.cluster.local
|
||||
```
|
||||
NOTE: While the option is called `jaeger-collector-host`, you will need to point this to a `jaeger-agent`, and not the `jaeger-collector` component.
|
||||
Alternatively, you can set `jaeger-endpoint` and specify the full endpoint for uploading traces. This will use TCP and should be used for a collector rather than an agent.
|
||||
|
||||
Next you will need to deploy a distributed tracing system which uses OpenTracing.
|
||||
[Zipkin](https://github.com/openzipkin/zipkin) and
|
||||
[Jaeger](https://github.com/jaegertracing/jaeger) and
|
||||
[Datadog](https://github.com/DataDog/dd-opentracing-cpp)
|
||||
have been tested.
|
||||
|
||||
Other optional configuration options:
|
||||
```
|
||||
# specifies the name to use for the server span
|
||||
opentracing-operation-name
|
||||
|
||||
# specifies specifies the name to use for the location span
|
||||
opentracing-location-operation-name
|
||||
|
||||
# sets whether or not to trust incoming tracing spans
|
||||
opentracing-trust-incoming-span
|
||||
|
||||
# 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
|
||||
zipkin-sample-rate
|
||||
|
||||
# specifies the port to use when uploading traces, Default: 6831
|
||||
jaeger-collector-port
|
||||
|
||||
# specifies the endpoint to use when uploading traces to a collector instead of an agent
|
||||
jaeger-endpoint
|
||||
|
||||
# specifies the service name to use for any traces created, Default: nginx
|
||||
jaeger-service-name
|
||||
|
||||
# specifies the traceparent/tracestate propagation format
|
||||
jaeger-propagation-format
|
||||
|
||||
# specifies the sampler to be used when sampling traces.
|
||||
# The available samplers are: const, probabilistic, ratelimiting, remote, Default: const
|
||||
jaeger-sampler-type
|
||||
|
||||
# specifies the argument to be passed to the sampler constructor, Default: 1
|
||||
jaeger-sampler-param
|
||||
|
||||
# Specifies the custom remote sampler host to be passed to the sampler constructor. Must be a valid URL.
|
||||
# Default: http://127.0.0.1
|
||||
jaeger-sampler-host
|
||||
|
||||
# Specifies the custom remote sampler port to be passed to the sampler constructor. Must be a number. Default: 5778
|
||||
jaeger-sampler-port
|
||||
|
||||
# Specifies the header name used for passing trace context. Must be a string. Default: uber-trace-id
|
||||
jaeger-trace-context-header-name
|
||||
|
||||
# Specifies the header name used for force sampling. Must be a string. Default: jaeger-debug-id
|
||||
jaeger-debug-header
|
||||
|
||||
# Specifies the header name used to submit baggage if there is no root span. Must be a string. Default: jaeger-baggage
|
||||
jaeger-baggage-header
|
||||
|
||||
# Specifies the header prefix used to propagate baggage. Must be a string. Default: uberctx-
|
||||
jaeger-tracer-baggage-header-prefix
|
||||
|
||||
# specifies the port to use when uploading traces, Default 8126
|
||||
datadog-collector-port
|
||||
|
||||
# specifies the service name to use for any traces created, Default: nginx
|
||||
datadog-service-name
|
||||
|
||||
# specifies the environment this trace belongs to, Default: prod
|
||||
datadog-environment
|
||||
|
||||
# specifies the operation name to use for any traces collected, Default: nginx.handle
|
||||
datadog-operation-name-override
|
||||
|
||||
# Specifies to use client-side sampling for distributed priority sampling and ignore sample rate, Default: true
|
||||
datadog-priority-sampling
|
||||
|
||||
# specifies sample rate for any traces created, Default: 1.0
|
||||
datadog-sample-rate
|
||||
```
|
||||
|
||||
All these options (including host) allow environment variables, such as `$HOSTNAME` or `$HOST_IP`. In the case of Jaeger, if you have a Jaeger agent running on each machine in your cluster, you can use something like `$HOST_IP` (which can be 'mounted' with the `status.hostIP` fieldpath, as described [here](https://kubernetes.io/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/#capabilities-of-the-downward-api)) to make sure traces will be sent to the local agent.
|
||||
|
||||
|
||||
Note that you can also set whether to trust incoming spans (global default is true) per-location using annotations like the following:
|
||||
```
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/opentracing-trust-incoming-span: "true"
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
The following examples show how to deploy and test different distributed tracing systems. These example can be performed using Minikube.
|
||||
|
||||
### Zipkin
|
||||
|
||||
In the [rnburn/zipkin-date-server](https://github.com/rnburn/zipkin-date-server)
|
||||
GitHub repository is an example of a dockerized date service. 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
|
||||
```
|
||||
|
||||
Also we need to configure the Ingress-NGINX controller ConfigMap with the required values:
|
||||
|
||||
```
|
||||
$ echo '
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
data:
|
||||
enable-opentracing: "true"
|
||||
zipkin-collector-host: zipkin.default.svc.cluster.local
|
||||
metadata:
|
||||
name: ingress-nginx-controller
|
||||
namespace: kube-system
|
||||
' | kubectl replace -f -
|
||||
```
|
||||
|
||||
In the Zipkin interface we can see the details:
|
||||

|
||||
|
||||
### Jaeger
|
||||
|
||||
1. Enable Ingress addon in Minikube:
|
||||
```
|
||||
$ minikube addons enable ingress
|
||||
```
|
||||
|
||||
2. Add Minikube IP to /etc/hosts:
|
||||
```
|
||||
$ echo "$(minikube ip) example.com" | sudo tee -a /etc/hosts
|
||||
```
|
||||
|
||||
3. Apply a basic Service and Ingress Resource:
|
||||
```
|
||||
# Create Echoheaders Deployment
|
||||
$ kubectl run echoheaders --image=registry.k8s.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: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: echo-ingress
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: example.com
|
||||
http:
|
||||
paths:
|
||||
- path: /echo
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: echoheaders-x
|
||||
port:
|
||||
number: 80
|
||||
' | kubectl apply -f -
|
||||
```
|
||||
|
||||
4. Enable OpenTracing and set the jaeger-collector-host:
|
||||
```
|
||||
$ echo '
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
data:
|
||||
enable-opentracing: "true"
|
||||
jaeger-collector-host: jaeger-agent.default.svc.cluster.local
|
||||
metadata:
|
||||
name: ingress-nginx-controller
|
||||
namespace: kube-system
|
||||
' | kubectl replace -f -
|
||||
```
|
||||
|
||||
5. Apply the Jaeger All-In-One Template:
|
||||
```
|
||||
$ kubectl apply -f https://raw.githubusercontent.com/jaegertracing/jaeger-kubernetes/master/all-in-one/jaeger-all-in-one-template.yml
|
||||
```
|
||||
|
||||
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
|
||||
content-length=4
|
||||
content-type=application/x-www-form-urlencoded
|
||||
host=example.com
|
||||
user-agent=curl/7.54.0
|
||||
x-forwarded-for=192.168.99.1
|
||||
x-forwarded-host=example.com
|
||||
x-forwarded-port=80
|
||||
x-forwarded-proto=http
|
||||
x-original-uri=/echo
|
||||
x-real-ip=192.168.99.1
|
||||
x-scheme=http
|
||||
BODY:
|
||||
meow
|
||||
```
|
||||
|
||||
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:
|
||||

|
|
@ -325,7 +325,6 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J
|
|||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
|
||||
github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M=
|
||||
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
||||
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
|
||||
|
|
|
@ -6,10 +6,6 @@ This custom image contains:
|
|||
- [ngx_http_substitutions_filter_module](https://github.com/yaoweibin/ngx_http_substitutions_filter_module)
|
||||
- [OpenTelemetry-CPP](https://github.com/open-telemetry/opentelemetry-cpp)
|
||||
- [OpenTelemetry-CPP-Nginx](https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/nginx)
|
||||
- [nginx-opentracing](https://github.com/opentracing-contrib/nginx-opentracing)
|
||||
- [opentracing-cpp](https://github.com/opentracing/opentracing-cpp)
|
||||
- [zipkin-cpp-opentracing](https://github.com/rnburn/zipkin-cpp-opentracing)
|
||||
- [dd-opentracing-cpp](https://github.com/DataDog/dd-opentracing-cpp)
|
||||
- [ModSecurity-nginx](https://github.com/SpiderLabs/ModSecurity-nginx) (only supported in x86_64)
|
||||
- [brotli](https://github.com/google/brotli)
|
||||
- [geoip2](https://github.com/leev/ngx_http_geoip2_module)
|
||||
|
|
|
@ -35,15 +35,6 @@ export NGINX_DIGEST_AUTH=1.0.0
|
|||
# Check for recent changes: https://github.com/yaoweibin/ngx_http_substitutions_filter_module/compare/v0.6.4...master
|
||||
export NGINX_SUBSTITUTIONS=b8a71eacc7f986ba091282ab8b1bbbc6ae1807e0
|
||||
|
||||
# Check for recent changes: https://github.com/opentracing-contrib/nginx-opentracing/compare/v0.19.0...master
|
||||
export NGINX_OPENTRACING_VERSION=0.19.0
|
||||
|
||||
#Check for recent changes: https://github.com/opentracing/opentracing-cpp/compare/v1.6.0...master
|
||||
export OPENTRACING_CPP_VERSION=f86b33f3d9e7322b1298ba62d5ffa7a9519c4c41
|
||||
|
||||
# Check for recent changes: https://github.com/rnburn/zipkin-cpp-opentracing/compare/v0.5.2...master
|
||||
export ZIPKIN_CPP_VERSION=f69593138ff84ca2f6bc115992e18ca3d35f344a
|
||||
|
||||
# Check for recent changes: https://github.com/jbeder/yaml-cpp/compare/yaml-cpp-0.7.0...master
|
||||
export YAML_CPP_VERSION=yaml-cpp-0.7.0
|
||||
|
||||
|
@ -53,9 +44,6 @@ export JAEGER_VERSION=0.7.0
|
|||
# Check for recent changes: https://github.com/msgpack/msgpack-c/compare/cpp-3.3.0...master
|
||||
export MSGPACK_VERSION=3.3.0
|
||||
|
||||
# Check for recent changes: https://github.com/DataDog/dd-opentracing-cpp/compare/v1.3.7...master
|
||||
export DATADOG_CPP_VERSION=1.3.7
|
||||
|
||||
# Check for recent changes: https://github.com/SpiderLabs/ModSecurity-nginx/compare/v1.0.3...master
|
||||
export MODSECURITY_VERSION=1.0.3
|
||||
|
||||
|
@ -213,15 +201,6 @@ get_src f09851e6309560a8ff3e901548405066c83f1f6ff88aa7171e0763bd9514762b \
|
|||
get_src a98b48947359166326d58700ccdc27256d2648218072da138ab6b47de47fbd8f \
|
||||
"https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/$NGINX_SUBSTITUTIONS.tar.gz"
|
||||
|
||||
get_src 6f97776ebdf019b105a755c7736b70bdbd7e575c7f0d39db5fe127873c7abf17 \
|
||||
"https://github.com/opentracing-contrib/nginx-opentracing/archive/v$NGINX_OPENTRACING_VERSION.tar.gz"
|
||||
|
||||
get_src cbe625cba85291712253db5bc3870d60c709acfad9a8af5a302673d3d201e3ea \
|
||||
"https://github.com/opentracing/opentracing-cpp/archive/$OPENTRACING_CPP_VERSION.tar.gz"
|
||||
|
||||
get_src 71de3d0658935db7ccea20e006b35e58ddc7e4c18878b9523f2addc2371e9270 \
|
||||
"https://github.com/rnburn/zipkin-cpp-opentracing/archive/$ZIPKIN_CPP_VERSION.tar.gz"
|
||||
|
||||
get_src 32a42256616cc674dca24c8654397390adff15b888b77eb74e0687f023c8751b \
|
||||
"https://github.com/SpiderLabs/ModSecurity-nginx/archive/v$MODSECURITY_VERSION.tar.gz"
|
||||
|
||||
|
@ -259,9 +238,6 @@ get_src 77bbcbb24c3c78f51560017288f3118d995fe71240aa379f5818ff6b166712ff \
|
|||
"https://github.com/openresty/luajit2/archive/v$LUAJIT_VERSION.tar.gz"
|
||||
fi
|
||||
|
||||
get_src 8d39c6b23f941a2d11571daaccc04e69539a3fcbcc50a631837560d5861a7b96 \
|
||||
"https://github.com/DataDog/dd-opentracing-cpp/archive/v$DATADOG_CPP_VERSION.tar.gz"
|
||||
|
||||
get_src b6c9c09fd43eb34a71e706ad780b2ead26549a9a9f59280fe558f5b7b980b7c6 \
|
||||
"https://github.com/leev/ngx_http_geoip2_module/archive/$GEOIP2_VERSION.tar.gz"
|
||||
|
||||
|
@ -340,21 +316,6 @@ cd "$BUILD_PATH"
|
|||
# Git tuning
|
||||
git config --global --add core.compression -1
|
||||
|
||||
# build opentracing lib
|
||||
cd "$BUILD_PATH/opentracing-cpp-$OPENTRACING_CPP_VERSION"
|
||||
mkdir .build
|
||||
cd .build
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DBUILD_MOCKTRACER=OFF \
|
||||
-DBUILD_STATIC_LIBS=ON \
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true \
|
||||
..
|
||||
|
||||
make
|
||||
make install
|
||||
|
||||
# build yaml-cpp
|
||||
# TODO @timmysilv: remove this and jaeger sed calls once it is fixed in jaeger-client-cpp
|
||||
|
@ -372,68 +333,6 @@ cmake -DCMAKE_BUILD_TYPE=Release \
|
|||
make
|
||||
make install
|
||||
|
||||
# build jaeger lib
|
||||
cd "$BUILD_PATH/jaeger-client-cpp-$JAEGER_VERSION"
|
||||
sed -i 's/-Werror/-Wno-psabi/' CMakeLists.txt
|
||||
# use the above built yaml-cpp instead until a new version of jaeger-client-cpp fixes the yaml-cpp issue
|
||||
# tl;dr new hunter is needed for new yaml-cpp, but new hunter has a conflict with old Thrift and new Boost
|
||||
sed -i 's/hunter_add_package(yaml-cpp)/#hunter_add_package(yaml-cpp)/' CMakeLists.txt
|
||||
sed -i 's/yaml-cpp::yaml-cpp/yaml-cpp/' CMakeLists.txt
|
||||
|
||||
cat <<EOF > export.map
|
||||
{
|
||||
global:
|
||||
OpenTracingMakeTracerFactory;
|
||||
local: *;
|
||||
};
|
||||
EOF
|
||||
|
||||
mkdir .build
|
||||
cd .build
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DJAEGERTRACING_BUILD_EXAMPLES=OFF \
|
||||
-DJAEGERTRACING_BUILD_CROSSDOCK=OFF \
|
||||
-DJAEGERTRACING_COVERAGE=OFF \
|
||||
-DJAEGERTRACING_PLUGIN=ON \
|
||||
-DHUNTER_CONFIGURATION_TYPES=Release \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DJAEGERTRACING_WITH_YAML_CPP=ON \
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true \
|
||||
..
|
||||
|
||||
make
|
||||
make install
|
||||
|
||||
export HUNTER_INSTALL_DIR=$(cat _3rdParty/Hunter/install-root-dir) \
|
||||
|
||||
mv libjaegertracing_plugin.so /usr/local/lib/libjaegertracing_plugin.so
|
||||
|
||||
|
||||
# build zipkin lib
|
||||
cd "$BUILD_PATH/zipkin-cpp-opentracing-$ZIPKIN_CPP_VERSION"
|
||||
|
||||
cat <<EOF > export.map
|
||||
{
|
||||
global:
|
||||
OpenTracingMakeTracerFactory;
|
||||
local: *;
|
||||
};
|
||||
EOF
|
||||
|
||||
mkdir .build
|
||||
cd .build
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DBUILD_PLUGIN=ON \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true \
|
||||
..
|
||||
|
||||
make
|
||||
make install
|
||||
|
||||
# build msgpack lib
|
||||
cd "$BUILD_PATH/msgpack-c-cpp-$MSGPACK_VERSION"
|
||||
|
@ -449,20 +348,6 @@ cmake -DCMAKE_BUILD_TYPE=Release \
|
|||
make
|
||||
make install
|
||||
|
||||
# build datadog lib
|
||||
cd "$BUILD_PATH/dd-opentracing-cpp-$DATADOG_CPP_VERSION"
|
||||
|
||||
mkdir .build
|
||||
cd .build
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true \
|
||||
..
|
||||
|
||||
make
|
||||
make install
|
||||
|
||||
# Get Brotli source and deps
|
||||
cd "$BUILD_PATH"
|
||||
git clone --depth=100 https://github.com/google/ngx_brotli.git
|
||||
|
@ -626,7 +511,6 @@ WITH_MODULES=" \
|
|||
--add-module=$BUILD_PATH/stream-lua-nginx-module-$LUA_STREAM_NGX_VERSION \
|
||||
--add-module=$BUILD_PATH/lua-upstream-nginx-module-$LUA_UPSTREAM_VERSION \
|
||||
--add-dynamic-module=$BUILD_PATH/nginx-http-auth-digest-$NGINX_DIGEST_AUTH \
|
||||
--add-dynamic-module=$BUILD_PATH/nginx-opentracing-$NGINX_OPENTRACING_VERSION/opentracing \
|
||||
--add-dynamic-module=$BUILD_PATH/ModSecurity-nginx-$MODSECURITY_VERSION \
|
||||
--add-dynamic-module=$BUILD_PATH/ngx_http_geoip2_module-${GEOIP2_VERSION} \
|
||||
--add-dynamic-module=$BUILD_PATH/ngx_brotli"
|
||||
|
|
Loading…
Reference in a new issue