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

optional posthog #98

Open
vijayvammi opened this issue May 7, 2024 · 1 comment
Open

optional posthog #98

vijayvammi opened this issue May 7, 2024 · 1 comment

Comments

@vijayvammi
Copy link

Hi Eduardo,

Noticing that ploomber-core depends on posthog for telemetry, may be?

The worrying thing is its attempt to log into an external end point, us-api.i.posthog.com

Traceback (most recent call last):
File "/Users/kxvn318/.pyenv/versions/3.9.16/lib/python3.9/logging/init.py", line 1086, in emit
stream.write(msg + self.terminator)
ValueError: I/O operation on closed file.
Call stack:
File "/Users/kxvn318/.pyenv/versions/3.9.16/lib/python3.9/threading.py", line 937, in _bootstrap
self._bootstrap_inner()
File "/Users/kxvn318/.pyenv/versions/3.9.16/lib/python3.9/threading.py", line 980, in _bootstrap_inner
self.run()
File "/Users/kxvn318/Library/Caches/pypoetry/virtualenvs/runnable-QaOCn3sv-py3.9/lib/python3.9/site-packages/posthog/consumer.py", line 65, in run
self.upload()
File "/Users/kxvn318/Library/Caches/pypoetry/virtualenvs/runnable-QaOCn3sv-py3.9/lib/python3.9/site-packages/posthog/consumer.py", line 81, in upload
self.request(batch)
File "/Users/kxvn318/Library/Caches/pypoetry/virtualenvs/runnable-QaOCn3sv-py3.9/lib/python3.9/site-packages/posthog/consumer.py", line 148, in request
send_request()
File "/Users/kxvn318/Library/Caches/pypoetry/virtualenvs/runnable-QaOCn3sv-py3.9/lib/python3.9/site-packages/backoff/_sync.py", line 105, in retry
ret = target(*args, **kwargs)
File "/Users/kxvn318/Library/Caches/pypoetry/virtualenvs/runnable-QaOCn3sv-py3.9/lib/python3.9/site-packages/backoff/_sync.py", line 20, in _call_handlers
hdlr(details)
File "/Users/kxvn318/Library/Caches/pypoetry/virtualenvs/runnable-QaOCn3sv-py3.9/lib/python3.9/site-packages/backoff/_common.py", line 120, in _log_giveup
logger.log(log_level, msg, *log_args)
Message: 'Giving up %s(...) after %d tries (%s)'
Arguments: ('send_request', 4, "requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='us-api.i.posthog.com', port=443): Max retries exceeded with url: /batch/ (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x11c10c730>, 'Connection to us-api.i.posthog.com timed out. (connect timeout=15)'))")

1). Could we make it optional install?
I set up the _PLOOMBER_TELEMETRY_DEBUG to but I still see an attempt to do telemetry.

Cheers,
Vijay

@edublancas
Copy link
Contributor

hi, you can disable telemetry with:

export PLOOMBER_STATS_ENABLED=false

I think you'll still need to have posthog installed, otherwise importing the package will break, but this will disable external API calls. let me know if you still have issues after disabling it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants