Skip to content
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

Improve testing #61

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Conversation

jackshirazi
Copy link
Contributor

This

  • Adds a local Elasticsearch instance
  • Starts the elastic agent as an otel collector with the traces configuration, bound to 0.0.0.0:4318
  • Adds a collector.banana endpoint pointing at localhost:4318 into the cluster to let the agents connect to the collector
  • Changes the python, nodejs and java configurations/images to generate traces from the app
  • Confirms that the traces have propagated through to Elasticsearch

So the test is now a full end-to-end trace test. The test is also setup to switch to run on both amd64 and arc64, though the arc64 option is commented for the moment

@jackshirazi jackshirazi requested a review from xrmx December 3, 2024 14:30
@jackshirazi jackshirazi requested a review from swiatekm December 13, 2024 11:02
docker run --name es01 --net elastic -p 9200:9200 -m 1GB -e xpack.security.enabled=false -e xpack.security.enrollment.enabled=false -e discovery.type=single-node docker.elastic.co/elasticsearch/elasticsearch:8.16.1 1>es.log 2>&1 &
bash test/operator/utilities/wait_for_es_http_ready.bash http://localhost:9200

- name: Start Collector
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you provide more information about why this Collector instance is needed? Why not using the Operator's endpoint?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flow of trace data is app->app agent->collector->ES, so it needs a collector. The operator endpoint is for mutating the k8s definitions so that's entirely separate, that's not involved in the flow of traces

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be missing something, but if you are using the values.yaml file we ship to deploy the Operator, it will deploy a collector in each K8s node with an open OTLP endpoint for traces. Those collectors will have the same processing components that the one you are launching manually.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah gotcha. yes that didn't seem to be working in my tests. It was easier for me to spin up a new collector with the traces config. If you think it's straightforward to have it running so that it sends traces, we can do that, I agree it would be better

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the data already has the right shape, then your collector here could just receive data and forward it to ES, if you really want to have it. It doesn't need to use this full config.

Though if it was up to me, I'd just ES itself in the K8s cluster and forward the 9200 port.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The collector does some transforms on the incoming data from the application agents, so I think it needs to be correctly configured for handling incoming trace data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants