diff --git a/src/sentry/runner/__init__.py b/src/sentry/runner/__init__.py index 5e5b7012ef98a6..ca35613dbccfe7 100644 --- a/src/sentry/runner/__init__.py +++ b/src/sentry/runner/__init__.py @@ -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 @@ -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: