mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Tracing: Add setting for sampling server (#29011)
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>
This commit is contained in:
parent
812f588a75
commit
e3c7d66324
@ -706,6 +706,8 @@ sampler_type = const
|
|||||||
# and indicates the initial sampling rate before the actual one
|
# and indicates the initial sampling rate before the actual one
|
||||||
# is received from the mothership
|
# is received from the mothership
|
||||||
sampler_param = 1
|
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).
|
# Whether or not to use Zipkin span propagation (x-b3- HTTP headers).
|
||||||
zipkin_propagation = false
|
zipkin_propagation = false
|
||||||
# Setting this to true disables shared RPC spans.
|
# Setting this to true disables shared RPC spans.
|
||||||
|
@ -698,6 +698,8 @@
|
|||||||
# and indicates the initial sampling rate before the actual one
|
# and indicates the initial sampling rate before the actual one
|
||||||
# is received from the mothership
|
# is received from the mothership
|
||||||
;sampler_param = 1
|
;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).
|
# Whether or not to use Zipkin propagation (x-b3- HTTP headers).
|
||||||
;zipkin_propagation = false
|
;zipkin_propagation = false
|
||||||
# Setting this to true disables shared RPC spans.
|
# Setting this to true disables shared RPC spans.
|
||||||
|
@ -1154,6 +1154,10 @@ This is the sampler configuration parameter. Depending on the value of `sampler_
|
|||||||
|
|
||||||
May be set with the environment variable `JAEGER_SAMPLER_PARAM`.
|
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
|
### zipkin_propagation
|
||||||
|
|
||||||
Default value is `false`.
|
Default value is `false`.
|
||||||
|
@ -25,6 +25,7 @@ type TracingService struct {
|
|||||||
customTags map[string]string
|
customTags map[string]string
|
||||||
samplerType string
|
samplerType string
|
||||||
samplerParam float64
|
samplerParam float64
|
||||||
|
samplingServerURL string
|
||||||
log log.Logger
|
log log.Logger
|
||||||
closer io.Closer
|
closer io.Closer
|
||||||
zipkinPropagation bool
|
zipkinPropagation bool
|
||||||
@ -60,6 +61,7 @@ func (ts *TracingService) parseSettings() {
|
|||||||
ts.samplerParam = section.Key("sampler_param").MustFloat64(1)
|
ts.samplerParam = section.Key("sampler_param").MustFloat64(1)
|
||||||
ts.zipkinPropagation = section.Key("zipkin_propagation").MustBool(false)
|
ts.zipkinPropagation = section.Key("zipkin_propagation").MustBool(false)
|
||||||
ts.disableSharedZipkinSpans = section.Key("disable_shared_zipkin_spans").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) {
|
func (ts *TracingService) initJaegerCfg() (jaegercfg.Configuration, error) {
|
||||||
@ -67,8 +69,9 @@ func (ts *TracingService) initJaegerCfg() (jaegercfg.Configuration, error) {
|
|||||||
ServiceName: "grafana",
|
ServiceName: "grafana",
|
||||||
Disabled: !ts.enabled,
|
Disabled: !ts.enabled,
|
||||||
Sampler: &jaegercfg.SamplerConfig{
|
Sampler: &jaegercfg.SamplerConfig{
|
||||||
Type: ts.samplerType,
|
Type: ts.samplerType,
|
||||||
Param: ts.samplerParam,
|
Param: ts.samplerParam,
|
||||||
|
SamplingServerURL: ts.samplingServerURL,
|
||||||
},
|
},
|
||||||
Reporter: &jaegercfg.ReporterConfig{
|
Reporter: &jaegercfg.ReporterConfig{
|
||||||
LogSpans: false,
|
LogSpans: false,
|
||||||
|
Loading…
Reference in New Issue
Block a user