Skip to content

Commit

Permalink
fix: temporary disable apm tracer config
Browse files Browse the repository at this point in the history
  • Loading branch information
1pkg committed Jul 30, 2024
1 parent bd568c1 commit 71e88b9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/beatcmd/beat_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func TestRunManager(t *testing.T) {
},
},
"instrumentation": map[string]interface{}{
"enabled": true,
"enabled": false,
"environment": "testenv",
},
}, m)
Expand Down
5 changes: 3 additions & 2 deletions internal/beatcmd/reloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,9 @@ func (r *Reloader) reload(inputConfig, outputConfig, apmTracingConfig *config.C)
if err != nil {
return fmt.Errorf("APM tracing config for elastic not found")
}
// set enabled manually as APMConfig doesn't contain it
c.SetBool("enabled", -1, true)
// set enabled manually as APMConfig doesn't contain it.
// TODO set "enable" to true after the issue https://github.com/elastic/elastic-agent/issues/5211 gets resolved.
c.SetBool("enabled", -1, false)
wrappedApmTracingConfig = config.MustNewConfigFrom(map[string]interface{}{
"instrumentation": c,
})
Expand Down
2 changes: 1 addition & 1 deletion internal/beatcmd/reloader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func TestReloaderNewRunnerParams(t *testing.T) {
args := <-calls
assert.NotNil(t, args.Logger)
assert.Equal(t, info, args.Info)
assert.Equal(t, config.MustNewConfigFrom(`{"revision": 1, "input": 123, "output.console.enabled": true, "instrumentation.enabled":true, "instrumentation.environment":"test"}`), args.Config)
assert.Equal(t, config.MustNewConfigFrom(`{"revision": 1, "input": 123, "output.console.enabled": true, "instrumentation.enabled":false, "instrumentation.environment":"test"}`), args.Config)
}

func expectNoEvent(t testing.TB, ch <-chan struct{}, message string) {
Expand Down

0 comments on commit 71e88b9

Please sign in to comment.