Skip to content
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
12 changes: 9 additions & 3 deletions airbyte/_util/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

import datetime
import os
import sys
from contextlib import suppress
from enum import Enum
from functools import lru_cache
Expand Down Expand Up @@ -104,7 +105,8 @@ def _setup_analytics() -> str | bool:
print(
"Thank you for using PyAirbyte!\n"
"Anonymous usage reporting is currently enabled. For more information, please"
" see https://docs.airbyte.com/telemetry"
" see https://docs.airbyte.com/telemetry",
file=sys.stderr,
)

if _ANALYTICS_FILE.exists():
Expand All @@ -127,7 +129,8 @@ def _setup_analytics() -> str | bool:
issues.append("Provided analytics ID did not match the file. Rewriting the file.")
print(
f"Received a user-provided analytics ID override in the '{_ENV_ANALYTICS_ID}' "
"environment variable."
"environment variable.",
file=sys.stderr,
)

# File is missing, incomplete, or stale. Create a new one.
Expand All @@ -147,7 +150,10 @@ def _setup_analytics() -> str | bool:

if DEBUG and issues:
nl = "\n"
print(f"One or more issues occurred when configuring usage tracking:\n{nl.join(issues)}")
print(
f"One or more issues occurred when configuring usage tracking:\n{nl.join(issues)}",
file=sys.stderr,
)

return anonymous_user_id

Expand Down
Loading