Skip to content

Commit

Permalink
fix cconfig.NewAgentParams in dogstatsd and secrets passing in jmx …
Browse files Browse the repository at this point in the history
…command (DataDog#21078)
  • Loading branch information
paulcacheux authored Nov 23, 2023
1 parent 5034a38 commit 07633f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/agent/subcommands/dogstatsd/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func Commands(globalParams *command.GlobalParams) []*cobra.Command {
return fxutil.OneShot(topContexts,
fx.Supply(&topFlags),
fx.Supply(core.BundleParams{
ConfigParams: cconfig.NewAgentParamsWithoutSecrets(globalParams.ConfFilePath),
ConfigParams: cconfig.NewAgentParams(globalParams.ConfFilePath),
LogParams: log.ForOneShot(command.LoggerName, "off", true)}),
core.Bundle,
)
Expand All @@ -69,7 +69,7 @@ func Commands(globalParams *command.GlobalParams) []*cobra.Command {
RunE: func(cmd *cobra.Command, args []string) error {
return fxutil.OneShot(dumpContexts,
fx.Supply(core.BundleParams{
ConfigParams: cconfig.NewAgentParamsWithoutSecrets(globalParams.ConfFilePath),
ConfigParams: cconfig.NewAgentParams(globalParams.ConfFilePath),
LogParams: log.ForOneShot(command.LoggerName, "off", true)}),

core.Bundle,
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/standalone/jmx.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func ExecJmxListWithRateMetricsJSON(selectedChecks []string, logLevel string, co
// The common utils, including AutoConfig, must have already been initialized.
func execJmxCommand(command string, selectedChecks []string, reporter jmxfetch.JMXReporter, output func(...interface{}), logLevel string, configs []integration.Config, wmeta workloadmeta.Component, senderManager sender.DiagnoseSenderManager) error {
// start the cmd HTTP server
if err := api.StartServer(nil, nil, nil, nil, nil, wmeta, optional.NewNoneOption[logsAgent.Component](), senderManager, nil, nil, nil, nil); err != nil {
if err := api.StartServer(nil, nil, nil, nil, nil, wmeta, optional.NewNoneOption[logsAgent.Component](), senderManager, nil, nil, nil, nil, nil); err != nil {
return fmt.Errorf("Error while starting api server, exiting: %v", err)
}

Expand Down

0 comments on commit 07633f3

Please sign in to comment.