Sample rate configmap option for zipkin in nginx-opentracing
This commit is contained in:
parent
29c5d77068
commit
bc53d1eb74
4 changed files with 15 additions and 1 deletions
|
@ -107,6 +107,7 @@ The following table shows a configuration option's name, type, and the default v
|
|||
|[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-service-name](#jaeger-service-name)|string|"nginx"|
|
||||
|
@ -601,6 +602,10 @@ Specifies the port to use when uploading traces. _**default:**_ 9411
|
|||
|
||||
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.
|
||||
|
|
|
@ -31,6 +31,9 @@ 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
|
||||
jaeger-collector-port
|
||||
|
||||
|
|
|
@ -433,6 +433,10 @@ type Configuration struct {
|
|||
// Default: nginx
|
||||
ZipkinServiceName string `json:"zipkin-service-name"`
|
||||
|
||||
// ZipkinSampleRate specifies sampling rate for traces
|
||||
// Default: 1.0
|
||||
ZipkinSampleRate float32 `json:"zipkin-sample-rate"`
|
||||
|
||||
// JaegerCollectorHost specifies the host to use when uploading traces
|
||||
JaegerCollectorHost string `json:"jaeger-collector-host"`
|
||||
|
||||
|
@ -612,6 +616,7 @@ func NewDefault() Configuration {
|
|||
BindAddressIpv6: defBindAddress,
|
||||
ZipkinCollectorPort: 9411,
|
||||
ZipkinServiceName: "nginx",
|
||||
ZipkinSampleRate: 1.0,
|
||||
JaegerCollectorPort: 6831,
|
||||
JaegerServiceName: "nginx",
|
||||
JaegerSamplerType: "const",
|
||||
|
|
|
@ -787,7 +787,8 @@ func configureDynamically(pcfg *ingress.Configuration, port int) error {
|
|||
const zipkinTmpl = `{
|
||||
"service_name": "{{ .ZipkinServiceName }}",
|
||||
"collector_host": "{{ .ZipkinCollectorHost }}",
|
||||
"collector_port": {{ .ZipkinCollectorPort }}
|
||||
"collector_port": {{ .ZipkinCollectorPort }},
|
||||
"sample_rate": {{ .ZipkinSampleRate }}
|
||||
}`
|
||||
|
||||
const jaegerTmpl = `{
|
||||
|
|
Loading…
Reference in a new issue