Skip to content

Commit

Permalink
Simulate en error to see how agent behaves
Browse files Browse the repository at this point in the history
  • Loading branch information
jagan2221 committed Sep 17, 2024
1 parent 34103e8 commit dfe9f87
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/extension/opampextension/opamp_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,8 @@ func (o *opampAgent) onMessage(ctx context.Context, msg *types.MessageData) {
if msg.RemoteConfig != nil {
var err error
configChanged, err = o.applyRemoteConfig(msg.RemoteConfig)
if err != nil {
if err == nil {
err = errors.New("Simulated error-test")
o.logger.Error("Failed to apply OpAMP agent remote config", zap.Error(err))
err = o.opampClient.SetRemoteConfigStatus(&protobufs.RemoteConfigStatus{
LastRemoteConfigHash: msg.RemoteConfig.ConfigHash,
Expand Down

0 comments on commit dfe9f87

Please sign in to comment.