Fix missing configuration for jaeger reporter
This commit is contained in:
parent
72bc74001f
commit
f1f2e1bf64
3 changed files with 16 additions and 7 deletions
|
@ -214,6 +214,7 @@ func NewTraefikDefaultPointersConfiguration() *TraefikConfiguration {
|
||||||
SamplingServerURL: "http://localhost:5778/sampling",
|
SamplingServerURL: "http://localhost:5778/sampling",
|
||||||
SamplingType: "const",
|
SamplingType: "const",
|
||||||
SamplingParam: 1.0,
|
SamplingParam: 1.0,
|
||||||
|
LocalAgentHostPort: "127.0.0.1:6832",
|
||||||
},
|
},
|
||||||
Zipkin: &zipkin.Config{
|
Zipkin: &zipkin.Config{
|
||||||
HTTPEndpoint: "http://localhost:9411/api/v1/spans",
|
HTTPEndpoint: "http://localhost:9411/api/v1/spans",
|
||||||
|
|
|
@ -45,6 +45,12 @@ Træfik supports two backends: Jaeger and Zipkin.
|
||||||
# Default: 1.0
|
# Default: 1.0
|
||||||
#
|
#
|
||||||
SamplingParam = 1.0
|
SamplingParam = 1.0
|
||||||
|
|
||||||
|
# LocalAgentHostPort instructs reporter to send spans to jaeger-agent at this address
|
||||||
|
#
|
||||||
|
# Default: "127.0.0.1:6832"
|
||||||
|
#
|
||||||
|
LocalAgentHostPort = "127.0.0.1:6832"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Zipkin
|
## Zipkin
|
||||||
|
|
|
@ -18,6 +18,7 @@ type Config struct {
|
||||||
SamplingServerURL string `description:"set the sampling server url." export:"false"`
|
SamplingServerURL string `description:"set the sampling server url." export:"false"`
|
||||||
SamplingType string `description:"set the sampling type." export:"true"`
|
SamplingType string `description:"set the sampling type." export:"true"`
|
||||||
SamplingParam float64 `description:"set the sampling parameter." export:"true"`
|
SamplingParam float64 `description:"set the sampling parameter." export:"true"`
|
||||||
|
LocalAgentHostPort string `description:"set jaeger-agent's host:port that the reporter will used." export:"false"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup sets up the tracer
|
// Setup sets up the tracer
|
||||||
|
@ -30,6 +31,7 @@ func (c *Config) Setup(componentName string) (opentracing.Tracer, io.Closer, err
|
||||||
},
|
},
|
||||||
Reporter: &jaegercfg.ReporterConfig{
|
Reporter: &jaegercfg.ReporterConfig{
|
||||||
LogSpans: true,
|
LogSpans: true,
|
||||||
|
LocalAgentHostPort: c.LocalAgentHostPort,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue