Tracing: Add setting for sampling server (#29011) (#29015)

Signed-off-by: bergquist <carl.bergquist@gmail.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
(cherry picked from commit e3c7d66324)

Co-authored-by: Carl Bergquist <carl@grafana.com>
This commit is contained in:
Grot (@grafanabot)
2020-11-11 10:42:38 +01:00
committed by GitHub
co-authored by Carl Bergquist
parent f142752ad6
commit 38b96278c8
4 changed files with 13 additions and 2 deletions
+2
View File
@@ -705,6 +705,8 @@ sampler_type = const
# and indicates the initial sampling rate before the actual one
# is received from the mothership
sampler_param = 1
# sampling_server_url is the URL of a sampling manager providing a sampling strategy.
sampling_server_url =
# Whether or not to use Zipkin span propagation (x-b3- HTTP headers).
zipkin_propagation = false
# Setting this to true disables shared RPC spans.
+2
View File
@@ -697,6 +697,8 @@
# and indicates the initial sampling rate before the actual one
# is received from the mothership
;sampler_param = 1
# sampling_server_url is the URL of a sampling manager providing a sampling strategy.
;sampling_server_url =
# Whether or not to use Zipkin propagation (x-b3- HTTP headers).
;zipkin_propagation = false
# Setting this to true disables shared RPC spans.
@@ -1159,6 +1159,10 @@ This is the sampler configuration parameter. Depending on the value of `sampler_
May be set with the environment variable `JAEGER_SAMPLER_PARAM`.
### sampling_server_url
sampling_server_url is the URL of a sampling manager providing a sampling strategy.
### zipkin_propagation
Default value is `false`.
+5 -2
View File
@@ -25,6 +25,7 @@ type TracingService struct {
customTags map[string]string
samplerType string
samplerParam float64
samplingServerURL string
log log.Logger
closer io.Closer
zipkinPropagation bool
@@ -60,6 +61,7 @@ func (ts *TracingService) parseSettings() {
ts.samplerParam = section.Key("sampler_param").MustFloat64(1)
ts.zipkinPropagation = section.Key("zipkin_propagation").MustBool(false)
ts.disableSharedZipkinSpans = section.Key("disable_shared_zipkin_spans").MustBool(false)
ts.samplingServerURL = section.Key("sampling_server_url").MustString("")
}
func (ts *TracingService) initJaegerCfg() (jaegercfg.Configuration, error) {
@@ -67,8 +69,9 @@ func (ts *TracingService) initJaegerCfg() (jaegercfg.Configuration, error) {
ServiceName: "grafana",
Disabled: !ts.enabled,
Sampler: &jaegercfg.SamplerConfig{
Type: ts.samplerType,
Param: ts.samplerParam,
Type: ts.samplerType,
Param: ts.samplerParam,
SamplingServerURL: ts.samplingServerURL,
},
Reporter: &jaegercfg.ReporterConfig{
LogSpans: false,