Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing configuration for jaeger reporter #2720

Merged
merged 1 commit into from
Jan 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions cmd/traefik/configuration.go
Expand Up @@ -211,9 +211,10 @@ func NewTraefikDefaultPointersConfiguration() *TraefikConfiguration {
Backend: "jaeger",
ServiceName: "traefik",
Jaeger: &jaeger.Config{
SamplingServerURL: "http://localhost:5778/sampling",
SamplingType: "const",
SamplingParam: 1.0,
SamplingServerURL: "http://localhost:5778/sampling",
SamplingType: "const",
SamplingParam: 1.0,
LocalAgentHostPort: "127.0.0.1:6832",
},
Zipkin: &zipkin.Config{
HTTPEndpoint: "http://localhost:9411/api/v1/spans",
Expand Down
6 changes: 6 additions & 0 deletions docs/configuration/tracing.md
Expand Up @@ -45,6 +45,12 @@ Træfik supports two backends: Jaeger and Zipkin.
# Default: 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
Expand Down
10 changes: 6 additions & 4 deletions middlewares/tracing/jaeger/jaeger.go
Expand Up @@ -15,9 +15,10 @@ const Name = "jaeger"

// Config provides configuration settings for a jaeger tracer
type Config struct {
SamplingServerURL string `description:"set the sampling server url." export:"false"`
SamplingType string `description:"set the sampling type." export:"true"`
SamplingParam float64 `description:"set the sampling parameter." export:"true"`
SamplingServerURL string `description:"set the sampling server url." export:"false"`
SamplingType string `description:"set the sampling type." 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
Expand All @@ -29,7 +30,8 @@ func (c *Config) Setup(componentName string) (opentracing.Tracer, io.Closer, err
Param: c.SamplingParam,
},
Reporter: &jaegercfg.ReporterConfig{
LogSpans: true,
LogSpans: true,
LocalAgentHostPort: c.LocalAgentHostPort,
},
}

Expand Down