Skip to content

Commit

Permalink
chore(tracing): rename cli key
Browse files Browse the repository at this point in the history
  • Loading branch information
plyr4 committed Sep 17, 2024
1 parent 1c85ab6 commit 90d0514
Showing 1 changed file with 6 additions and 6 deletions.
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.tasks")
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

0 comments on commit 90d0514

Please sign in to comment.