Skip to content

Commit

Permalink
Update opamp_agent.go
Browse files Browse the repository at this point in the history
  • Loading branch information
jagan2221 committed Aug 30, 2024
1 parent 3e13dd3 commit 3f931b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/extension/opampextension/opamp_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ func (o *opampAgent) composeEffectiveConfig() *protobufs.EffectiveConfig {
}

func (o *opampAgent) applyRemoteConfig(config *protobufs.AgentRemoteConfig) (configChanged bool, err error) {
o.logger.Debug("Received remote config from OpAMP server", zap.ByteString("hash", config.ConfigHash))
o.logger.Info("Received remote config from OpAMP server", zap.ByteString("hash", config.ConfigHash))

if !o.cfg.AcceptsRemoteConfiguration {
return false, fmt.Errorf("OpAMP agent does not accept remote configuration")
Expand All @@ -501,6 +501,8 @@ func (o *opampAgent) applyRemoteConfig(config *protobufs.AgentRemoteConfig) (con
}

fb, err := k.Marshal(yaml.Parser())
o.logger.Info("Agent config yaml", zap.String("config", string(fb)))

if err != nil {
return false, fmt.Errorf("cannot marshal config named %s: %v", n, err)
}
Expand Down

0 comments on commit 3f931b9

Please sign in to comment.