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

Revert "ref(metrics): Add metrics for script run times (#72223)" #73447

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements-dev-frozen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ rsa==4.8
s3transfer==0.10.0
selenium==4.16.0
sentry-arroyo==2.16.5
sentry-cli==2.32.0
sentry-cli==2.16.0
sentry-devenv==1.6.2
sentry-forked-django-stubs==5.0.2.post4
sentry-forked-djangorestframework-stubs==3.15.0.post1
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pytest-sentry>=0.3.0
pytest-xdist>=3
responses>=0.23.1
selenium>=4.16.0
sentry-cli>=2.32.0
sentry-cli>=2.16.0

# pre-commit dependencies
pre-commit>=3.3
Expand Down
11 changes: 0 additions & 11 deletions scripts/do.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,4 @@ source "${HERE}/lib.sh"
# a venv can avoid enabling this by setting SENTRY_NO_VENV_CHECK
[ -z "${SENTRY_NO_VENV_CHECK+x}" ] && eval "${HERE}/ensure-venv.sh"
# If you call this script
start=`date +%s`
"$@"
end=`date +%s`
duration=$(($end-$start))

# If we're not in CI, send a metric of the script's execution time
if [ -z "${CI+x}" ]; then
configure-sentry-cli
# DSN for `sentry-devservices` project in the Sentry SDKs org. Used as authentication for sentry-cli.
export SENTRY_DSN=https://[email protected]/4507346183716864
"${venv_name}"/bin/sentry-cli send-metric distribution -n script_execution_time -v $duration -u second -t script:$1
fi
15 changes: 0 additions & 15 deletions scripts/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,6 @@ require() {
command -v "$1" >/dev/null 2>&1
}

configure-sentry-cli() {
if [ -f "${venv_name}/bin/sentry-cli" ]; then
return 0
elif [ -f "${venv_name}/bin/pip" ]; then
pip-install sentry-cli
else
cat <<EOF
${red}${bold}
ERROR: sentry-cli could not be installed, please run "devenv sync".
${reset}
EOF
return 1
fi
}

query-valid-python-version() {
python_version=$(python3 -V 2>&1 | awk '{print $2}')
if [[ -n "${SENTRY_PYTHON_VERSION:-}" ]]; then
Expand Down
Loading