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
12 changes: 6 additions & 6 deletions tracing/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,17 @@ func FromCLIContext(c *cli.Context) (*Client, error) {
},
}

// read per-endpoint configurations from file
endpointsConfigPath := c.String("tracing.sampler.endpoints")
if len(endpointsConfigPath) > 0 {
f, err := os.ReadFile(endpointsConfigPath)
// read per-task configurations from file
tasksConfigPath := c.String("tracing.sampler.tasks")
if len(tasksConfigPath) > 0 {
f, err := os.ReadFile(tasksConfigPath)
if err != nil {
return nil, errors.Wrap(err, fmt.Sprintf("unable to read tracing endpoints config file from path %s", endpointsConfigPath))
return nil, errors.Wrap(err, fmt.Sprintf("unable to read tracing tasks config file from path %s", tasksConfigPath))
}

err = json.Unmarshal(f, &cfg.Sampler.Tasks)
if err != nil {
return nil, errors.Wrap(err, fmt.Sprintf("unable to parse tracing endpoints config file from path %s", endpointsConfigPath))
return nil, errors.Wrap(err, fmt.Sprintf("unable to parse tracing tasks config file from path %s", tasksConfigPath))
}
}

Expand Down
2 changes: 1 addition & 1 deletion tracing/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ var Flags = []cli.Flag{

&cli.StringFlag{
EnvVars: []string{"VELA_OTEL_TRACING_SAMPLER_TASKS_CONFIG_FILEPATH"},
Name: "tracing.sampler.endpoints",
Name: "tracing.sampler.tasks",
Usage: "set an (optional) filepath to the otel tracing head-sampler configurations json to alter how certain tasks (endpoints, queries, etc) are sampled. when no path is provided all tasks are recorded using default parameters. see: https://opentelemetry.io/docs/concepts/sampling/",
},
}