Skip to content

Commit

Permalink
chore(observability): Remove Prometheus metrics aggregation (#1642)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcelo R Costa authored Jun 28, 2021
1 parent 7e78985 commit 85723c0
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions Docker/python-nginx/python3.6-alpine3.7/dockerrun.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,46 +98,5 @@ echo "import=ddtrace.bootstrap.sitecustomize" >> /etc/uwsgi/uwsgi.ini
) &
fi

if [[ $GEN3_DRYRUN == "False" ]]; then
(
while true; do
logrotate --force /etc/logrotate.d/nginx
sleep 86400
done
) &
fi

if [[ $GEN3_DRYRUN == "False" ]]; then
(
ENABLE_SVC_METRICS_SCRAPING="false"

attempt=0
maxAttempts=10

while true; do

curl -s http://127.0.0.1:9117/metrics > /var/www/metrics/metrics.txt
curl -s http://127.0.0.1:9113/metrics >> /var/www/metrics/metrics.txt
curl -s http://127.0.0.1:4040/metrics >> /var/www/metrics/metrics.txt

if [ $attempt -lt $maxAttempts ]; then
if [ "$ENABLE_SVC_METRICS_SCRAPING" == "false" ]; then
service_metrics_endpoint=$(curl -L -s -o /dev/null -w "%{http_code}" -X GET http://localhost/metrics)

if [ "$service_metrics_endpoint" == 200 ]; then
ENABLE_SVC_METRICS_SCRAPING="true"
else
attempt=$(( $attempt + 1 ));
fi
else
curl -s http://127.0.0.1/metrics >> /var/www/metrics/metrics.txt
fi
fi

sleep 10
done
) &
fi

run nginx -g 'daemon off;'
wait

0 comments on commit 85723c0

Please sign in to comment.