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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user