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

ref(dx): Only show the analytics notice once #56757

Merged
Merged
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
15 changes: 11 additions & 4 deletions src/sentry/runner/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import sentry_sdk

import sentry
from sentry.runner.settings import get_sentry_conf
from sentry.utils.imports import import_string

# We need to run this here because of a concurrency bug in Python's locale
Expand Down Expand Up @@ -175,10 +176,16 @@ def main():
logging.basicConfig(format="%(levelname)s:%(message)s", level=logging.INFO)
logger = logging.getLogger(__name__)

logger.info(
"The Sentry runner will report development issues to Sentry.io. "
"Use SENTRY_DEVENV_NO_REPORT to avoid reporting issues."
)
# Only show analytics notice once
analytics_seen_file = os.path.join(get_sentry_conf(), "dev-analytics-notice-seen")
if not os.path.isfile(analytics_seen_file):
logger.info(
"The Sentry runner will report development issues to Sentry.io. "
"Use SENTRY_DEVENV_NO_REPORT to avoid reporting issues."
)
with open(analytics_seen_file, "w+") as file:
file.write("# This is an autogenerated file from the sentry command runner")

try:
func(**kwargs)
except Exception as e:
Expand Down
Loading