diff --git a/tracing/config.go b/tracing/config.go index 4e6ffbe29..9c9fe9d82 100644 --- a/tracing/config.go +++ b/tracing/config.go @@ -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)) } } diff --git a/tracing/flags.go b/tracing/flags.go index b26f2d876..30a838b00 100644 --- a/tracing/flags.go +++ b/tracing/flags.go @@ -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/", }, }