-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run apm-server standalone as part of e2e tests #3728
Conversation
0dae248
to
995ad25
Compare
resolved issues |
testing/e2e/agent_install_test.go
Outdated
// testAPMInstrumentationFile tests passing agentt.monitoring.apm.* config options through the elastic-agent.yml file during install time | ||
// it currently does not work, not sure if that is intended behaviour | ||
func (suite *AgentInstallSuite) testAPMInstrumentationFile() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blakerouse, If I replace the elastic-agent.yml file with the contents templated from testdata/agent-install-apm.tpl
do we expect apm traces to be enabled?
I think that is what is being reported in https://github.com/elastic/fleet-server/issues/3526
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on what I am reading in the Elastic Agent code it should be present - https://github.com/elastic/elastic-agent/blob/main/internal/pkg/agent/application/application.go#L246
I do wonder what is being passed into the policy by Fleet. It is possible that Fleet is just overriding all the values from the local configuration. Fleet policy always overrides local policy so thats very possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test policy that i'm using has:
agent:
monitoring:
enabled: false
logs: false
metrics: false
I can try to retest but chagne the elastic-agent.yml
to not have agent.monitoring
as a top level key
Quality Gate passedIssues Measures |
@michel-laterman @blakerouse what's the next step to move this PR forward? |
I'm just waiting on a review; the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Couldn't find anything that stands out.
What is the problem this PR solves?
We have had issues on cloud deployments where APM instrumentation is not properly propagated to fleet-server.
See elastic/elastic-agent#5204; this PR does not fix the underlying behaviour but has added tests to ensure APM config is effective in some e2e test cases.
How does this PR solve the problem?
Adds an integration test to ensure that
server/agent.go
propagates config fromproto.APMConfig
correctly.Adds the apm-server as a stand-alone binary in our e2e test suite, and specifies tests so we can test if fleet-server properly loads and sends trace information.
How to test this PR locally
make test-int
runs the integration test that ensuresproto.APMConfig
attributes are properly passed by the elastic-agent-client interactions when the fleet-server is in agent-modemake test-e2e
ensures traces are present in the ES cluster if the agent is started in stand-alone mode withserver.instrumentation.*
attributes set, or if theagent.monitoring.apm.*
attributes are set in the policy when running under an agent.Design Checklist
I have ensured my design is stateless and will work when multiple fleet-server instances are behind a load balancer.I have or intend to scale test my changes, ensuring it will work reliably with 100K+ agents connected.I have included fail safe mechanisms to limit the load on fleet-server: rate limiting, circuit breakers, caching, load shedding, etc.Checklist
I have made corresponding change to the default configuration filesI have added an entry in./changelog/fragments
using the changelog toolRelated issues