Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmd/dependency/base/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ type TracingConfig struct {
// Endpoint is the endpoint to report tracing log, example: "localhost:4317".
Endpoint string `yaml:"endpoint" mapstructure:"endpoint"`

// Path is the path to the tracing server, example: "/v1/traces" if the protocol is "http" or "https".
Path string `yaml:"path" mapstructure:"path"`

// ServiceName is the name of the service for tracing.
ServiceName string `yaml:"service-name" mapstructure:"service-name"`

Expand Down
10 changes: 7 additions & 3 deletions cmd/dependency/dependency.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,13 @@ func initJaegerTracer(ctx context.Context, tracingConfig base.TracingConfig) (fu
)

switch tracingConfig.Protocol {
case "http", "https":
addr := fmt.Sprintf("%s://%s", tracingConfig.Protocol, tracingConfig.Endpoint)
exporter, err = otlptracehttp.New(ctx, otlptracehttp.WithEndpointURL(addr), otlptracehttp.WithInsecure())
case "http":
exporter, err = otlptracehttp.New(ctx, otlptracehttp.WithEndpoint(tracingConfig.Endpoint), otlptracehttp.WithURLPath(tracingConfig.Path), otlptracehttp.WithInsecure())
if err != nil {
return nil, fmt.Errorf("could not create HTTP trace exporter: %w", err)
}
case "https":
exporter, err = otlptracehttp.New(ctx, otlptracehttp.WithEndpoint(tracingConfig.Endpoint), otlptracehttp.WithURLPath(tracingConfig.Path))
if err != nil {
return nil, fmt.Errorf("could not create HTTP trace exporter: %w", err)
}
Expand Down
5 changes: 0 additions & 5 deletions deploy/docker-compose/template/client.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,3 @@ metrics:
port: 4002
# # ip is the listen ip of the metrics server.
# ip: ""

# # tracing is the tracing configuration for dfdaemon.
# tracing:
# # addr is the address to report tracing log.
# addr: ""
4 changes: 0 additions & 4 deletions deploy/docker-compose/template/manager.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,3 @@ console: false

# Listen port for pprof, default is -1 (means disabled).
pprofPort: -1

tracing:
# Jaeger endpoint url, like: http://jaeger.dragonfly.svc:4317.
addr: ''
4 changes: 0 additions & 4 deletions deploy/docker-compose/template/scheduler.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,3 @@ console: false

# Listen port for pprof, default is -1 (means disabled).
pprofPort: -1

tracing:
# Jaeger endpoint url, like: http://jaeger.dragonfly.svc:4317.
addr: ''
5 changes: 0 additions & 5 deletions deploy/docker-compose/template/seed-client.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,3 @@ metrics:
port: 4012
# # ip is the listen ip of the metrics server.
# ip: ""

# # tracing is the tracing configuration for dfdaemon.
# tracing:
# # addr is the address to report tracing log.
# addr: ""
1 change: 1 addition & 0 deletions manager/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ func New() *Config {
Console: false,
PProfPort: -1,
Tracing: base.TracingConfig{
Path: "/v1/traces",
ServiceName: types.ManagerName,
},
},
Expand Down
1 change: 1 addition & 0 deletions scheduler/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ func New() *Config {
Console: false,
PProfPort: -1,
Tracing: base.TracingConfig{
Path: "/v1/traces",
ServiceName: types.SchedulerName,
},
},
Expand Down