Skip to content

Commit

Permalink
Revert "Enforce error reporting for self-hosted (#1753)"
Browse files Browse the repository at this point in the history
This reverts commit 156eef6.
  • Loading branch information
hubertdeng123 authored Oct 17, 2022
1 parent 156eef6 commit d8a6eb9
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 43 deletions.
7 changes: 7 additions & 0 deletions install/_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ umask 002
log_file="sentry_install_log-`date +'%Y-%m-%d_%H-%M-%S'`.txt"
exec &> >(tee -a "$log_file")

# Thanks to https://tldp.org/LDP/abs/html/intandnonint.html
if [[ "$(tty)" == "not a tty" ]]; then
PROMPTABLE=0
else
PROMPTABLE=1
fi

# Work from /install/ for install.sh, project root otherwise
if [[ "$(basename $0)" = "install.sh" ]]; then
cd "$(dirname $0)/install/"
Expand Down
131 changes: 88 additions & 43 deletions install/error-handling.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,51 +41,96 @@ send_event() {
}

if [[ -z "${REPORT_SELF_HOSTED_ISSUES:-}" ]]; then
echo
echo "Hey, so ... we would love to automatically find out about issues with your"
echo "Sentry instance so that we can improve the product. Turns out there is an app"
echo "for that, called Sentry. Would you be willing to let us automatically send data"
echo "about your instance upstream to Sentry for development and debugging purposes?"
echo
echo " y / yes / 1"
echo " n / no / 0"
echo
echo "(Btw, we send this to our own self-hosted Sentry instance, not to Sentry SaaS,"
echo "so that we can be in this together.)"
echo
echo "Here's the info we may collect:"
echo
echo " - OS username"
echo " - IP address"
echo " - install log"
echo " - runtime errors"
echo " - performance data"
echo
echo "Thirty (30) day retention. No marketing. Privacy policy at sentry.io/privacy."
echo
if [[ $PROMPTABLE == "0" ]]; then
echo
echo "Hey, so ... we would love to automatically find out about issues with your"
echo "Sentry instance so that we can improve the product. Turns out there is an app"
echo "for that, called Sentry. Would you be willing to let us automatically send data"
echo "about your instance upstream to Sentry for development and debugging purposes?"
echo "If so, rerun with:"
echo
echo " ./install.sh --report-self-hosted-issues"
echo
echo " or"
echo
echo " REPORT_SELF_HOSTED_ISSUES=1 ./install.sh"
echo
echo "(Btw, we send this to our own self-hosted Sentry instance, not to Sentry SaaS,"
echo "so that we can be in this together.)"
echo
echo "Here's the info we may collect:"
echo
echo " - OS username"
echo " - IP address"
echo " - install log"
echo " - runtime errors"
echo " - performance data"
echo
echo "Thirty (30) day retention. No marketing. Privacy policy at sentry.io/privacy."
echo
echo "For now we are defaulting to not reporting upstream, but our plan is to"
echo "hard-require a choice from you starting in version 22.10.0, because let's be"
echo "honest, none of you will act on this otherwise. To avoid disruption you can use"
echo "one of these flags:"
echo
echo " --report-self-hosted-issues"
echo " --no-report-self-hosted-issues"
echo
echo "or set the REPORT_SELF_HOSTED_ISSUES environment variable:"
echo
echo " REPORT_SELF_HOSTED_ISSUES=1 to send data"
echo " REPORT_SELF_HOSTED_ISSUES=0 to not send data"
echo
echo "Thanks for using Sentry."
echo
export REPORT_SELF_HOSTED_ISSUES=0 # opt-in for now
else
echo
echo "Hey, so ... we would love to automatically find out about issues with your"
echo "Sentry instance so that we can improve the product. Turns out there is an app"
echo "for that, called Sentry. Would you be willing to let us automatically send data"
echo "about your instance upstream to Sentry for development and debugging purposes?"
echo
echo " y / yes / 1"
echo " n / no / 0"
echo
echo "(Btw, we send this to our own self-hosted Sentry instance, not to Sentry SaaS,"
echo "so that we can be in this together.)"
echo
echo "Here's the info we may collect:"
echo
echo " - OS username"
echo " - IP address"
echo " - install log"
echo " - runtime errors"
echo " - performance data"
echo
echo "Thirty (30) day retention. No marketing. Privacy policy at sentry.io/privacy."
echo

yn=""
until [ ! -z "$yn" ]
do
read -p "y or n? " yn
case $yn in
y | yes | 1) export REPORT_SELF_HOSTED_ISSUES=1; echo; echo -n "Thank you.";;
n | no | 0) export REPORT_SELF_HOSTED_ISSUES=0; echo; echo -n "Understood.";;
*) yn="";;
esac
done
yn=""
until [ ! -z "$yn" ]
do
read -p "y or n? " yn
case $yn in
y | yes | 1) export REPORT_SELF_HOSTED_ISSUES=1; echo; echo -n "Thank you.";;
n | no | 0) export REPORT_SELF_HOSTED_ISSUES=0; echo; echo -n "Understood.";;
*) yn="";;
esac
done

echo " To avoid this prompt in the future, use one of these flags:"
echo
echo " --report-self-hosted-issues"
echo " --no-report-self-hosted-issues"
echo
echo "or set the REPORT_SELF_HOSTED_ISSUES environment variable:"
echo
echo " REPORT_SELF_HOSTED_ISSUES=1 to send data"
echo " REPORT_SELF_HOSTED_ISSUES=0 to not send data"
echo
sleep 5
echo " To avoid this prompt in the future, use one of these flags:"
echo
echo " --report-self-hosted-issues"
echo " --no-report-self-hosted-issues"
echo
echo "or set the REPORT_SELF_HOSTED_ISSUES environment variable:"
echo
echo " REPORT_SELF_HOSTED_ISSUES=1 to send data"
echo " REPORT_SELF_HOSTED_ISSUES=0 to not send data"
echo
sleep 5
fi
fi

# Make sure we can use sentry-cli if we need it.
Expand Down

0 comments on commit d8a6eb9

Please sign in to comment.