From 9820efcd44b3c49399d8c31d7008758a4a67644b Mon Sep 17 00:00:00 2001 From: dave vader <48764154+plyr4@users.noreply.github.com> Date: Wed, 18 Sep 2024 10:10:24 -0500 Subject: [PATCH] chore(tracing): rename cli key (#1187) --- tracing/config.go | 12 ++++++------ tracing/flags.go | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) 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/", }, }