-
Notifications
You must be signed in to change notification settings - Fork 925
Run soak tests from EC2 #1908
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
base: master
Are you sure you want to change the base?
Run soak tests from EC2 #1908
Conversation
🎉 All Contributor License Agreements have been signed. Ready to merge. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
7ff3316
to
6b72e5e
Compare
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.
PR Overview
This PR adds a configuration file for the OTEL agent to export metrics and logs from soak tests to Datadog.
- Adds a new YAML file for OTEL configuration.
- Configures receivers, processors, exporters, and service pipelines for both metrics and logs.
Reviewed Changes
File | Description |
---|---|
tests/soak/otel-config.yaml | Added OTEL configuration with receivers, processors, exporters, and service pipelines for Datadog integration |
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
6b72e5e
to
ff78cfb
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Use test code from the checked out branch instead of the selected CKPy version Bootstrap the same way as when changing version: with `build.sh`
69967b4
to
1ca46af
Compare
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
1ca46af
to
58c32c2
Compare
This comment has been minimized.
This comment has been minimized.
58c32c2
to
bd252ad
Compare
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
5e79cd4
to
bf3a2da
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
ff574c0
to
3554d29
Compare
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.
Thanks for PR! Left few comments.
rm -rf tmp-build | ||
librdkafka_branch=$1 | ||
python_branch=$2 | ||
otel_collector_version=0.130.0 |
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.
Can we move out versions in script to common config file?
|
||
extensions: | ||
sigv4auth: | ||
region: us-west-2 |
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.
Maybe change it to FILL_IN_REGION_HERE
?
|
||
LIBRDKAFKA_VERSIONS = [ | ||
# '2.11.1' | ||
# '2.10.1', |
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.
Why have we commented out 2.10.x version?
import os | ||
import subprocess | ||
|
||
PYTHON_SOAK_TEST_BRANCH = 'dev_otel_agent_soak_test' |
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.
Should this be updated to master
?
wget -O otel_collector_package.deb $otel_collector_package_url | ||
sudo dpkg -i otel_collector_package.deb | ||
rm otel_collector_package.deb | ||
sudo cp otel-config.yaml /etc/otelcol-contrib/config.yaml |
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.
Maybe add validation for otel config eg.
validate_config() {
local errors=0
if grep -q "FILL_IN_ROLE_ARN_HERE" otel-config.yaml; then
echo "ERROR: AWS Role ARN not configured in otel-config.yaml"
echo "Please set AWS_ROLE_ARN environment variable or edit the file"
errors=$((errors + 1))
fi
if grep -q "FILL_IN_REMOTE_WRITE_ENDPOINT_HERE" otel-config.yaml; then
echo "ERROR: Prometheus endpoint not configured"
echo "Please set PROMETHEUS_ENDPOINT environment variable"
errors=$((errors + 1))
fi
if [[ $errors -gt 0 ]]; then
echo "Configuration validation failed. Please fix the above errors."
exit 1
fi
echo "Configuration validation passed."
}
./configure --reconfigure | ||
echo "Configuring librdkafka $librdkafka_version with prefix $testdir/librdkafka-installation" | ||
./configure --prefix=$testdir/librdkafka-installation | ||
sudo make uninstall |
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.
sudo make uninstall | |
make uninstall |
time opentelemetry-instrument confluent-kafka-python/tests/soak/soakclient.py -i $TESTID -t $topic -r 80 -f confluent-kafka-python/ccloud.config 2>&1 | ||
# Ignore SIGINT in children (inherited) | ||
trap "" SIGINT | ||
time opentelemetry-instrument $testdir/soakclient.py -i $TESTID -t $topic -r 80 -f $1 |& tee /dev/tty | bzip2 > $logfile & |
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.
Maybe below can be followup tasks?
- Add log rotation.
- Add Log cleanup weekly or monthly.
PYTHON_SOAK_TEST_BRANCH = 'dev_otel_agent_soak_test' | ||
|
||
LIBRDKAFKA_VERSIONS = [ | ||
# '2.11.1' |
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.
What's your opinion on having master
branch also? This will help catch issues before release?
What
Adds OTEL config which would be used by OTEL agent to export the metrics and logs of Soak tests to Datadog.
Instructions to install OTEL agent on EC2:
This would start OTEL agent and tests would start exporting metrics and logs to it.
Other changes to run with EC2
Checklist
References
JIRA:
Test & Review
Open questions / Follow-ups