Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 3 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,11 @@ Contributing

See `contributing guidelines <https://github.com/platformio/platformio/blob/develop/CONTRIBUTING.md>`_.

Telemetry / Privacy Policy
--------------------------
Telemetry
---------

Share minimal diagnostics and usage information to help us make PlatformIO better.
It is enabled by default. For more information see:
Removed

* `Telemetry Setting <https://docs.platformio.org/en/latest/userguide/cmd_settings.html?utm_source=github&utm_medium=core#enable-telemetry>`_

License
-------
Expand Down
2 changes: 0 additions & 2 deletions platformio/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ def main(argv=None):
exit_code = int(exc.code)
except Exception as exc: # pylint: disable=broad-except
if not isinstance(exc, exception.ReturnErrorCode):
maintenance.on_platformio_exception(exc)
error_str = f"{exc.__class__.__name__}: "
if isinstance(exc, exception.PlatformioException):
error_str += str(exc)
Expand All @@ -131,7 +130,6 @@ def main(argv=None):
click.secho(error_str, fg="red", err=True)
exit_code = int(str(exc)) if str(exc).isdigit() else 1

maintenance.on_platformio_exit()
sys.argv = prev_sys_argv
return exit_code

Expand Down
7 changes: 0 additions & 7 deletions platformio/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ def projects_dir_validate(projects_dir):
"description": "Enable caching for HTTP API requests",
"value": True,
},
"enable_telemetry": {
"description": ("Telemetry service <https://bit.ly/pio-telemetry> (Yes/No)"),
"value": True,
},
"force_verbose": {
"description": "Force verbose output when processing environments",
"value": False,
Expand All @@ -69,7 +65,6 @@ def projects_dir_validate(projects_dir):
"command_ctx": None,
"caller_id": None,
"custom_project_conf": None,
"pause_telemetry": False,
}


Expand Down Expand Up @@ -274,8 +269,6 @@ def get_user_agent():
data.append("IDE/%s" % os.getenv("PLATFORMIO_IDE"))
data.append("Python/%s" % platform.python_version())
data.append("Platform/%s" % platform.platform())
if not get_setting("enable_telemetry"):
data.append("Telemetry/0")
return " ".join(data)


Expand Down
6 changes: 0 additions & 6 deletions platformio/debug/process/gdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
import signal
import time

from platformio import telemetry
from platformio.compat import aio_get_running_loop, is_bytes
from platformio.debug import helpers
from platformio.debug.exception import DebugInitError
from platformio.debug.process.client import DebugClientProcess


Expand Down Expand Up @@ -130,7 +128,6 @@ def stdout_data_received(self, data):
self._handle_error(data)
# go to init break automatically
if self.INIT_COMPLETED_BANNER.encode() in data:
telemetry.log_debug_started(self.debug_config)
self._auto_exec_continue()

def console_log(self, msg):
Expand Down Expand Up @@ -175,7 +172,4 @@ def _handle_error(self, data):
and b"Error in sourced" in self._errors_buffer
):
return
telemetry.log_debug_exception(
DebugInitError(self._errors_buffer.decode()), self.debug_config
)
self.transport.close()
20 changes: 1 addition & 19 deletions platformio/maintenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import click
import semantic_version

from platformio import __version__, app, exception, fs, telemetry
from platformio import __version__, app, exception, fs
from platformio.cache import cleanup_content_cache
from platformio.cli import PlatformioCLI
from platformio.commands.upgrade import get_latest_version
Expand All @@ -32,7 +32,6 @@
def on_cmd_start(ctx, caller):
app.set_session_var("command_ctx", ctx)
set_caller(caller)
telemetry.on_cmd_start(ctx)
if PlatformioCLI.in_silence():
return
after_upgrade(ctx)
Expand All @@ -57,14 +56,6 @@ def on_cmd_end():
)


def on_platformio_exception(exc):
telemetry.log_exception(exc)


def on_platformio_exit():
telemetry.on_exit()


def set_caller(caller=None):
caller = caller or os.getenv("PLATFORMIO_CALLER")
if not caller:
Expand Down Expand Up @@ -103,7 +94,6 @@ def _appstate_migration(_):
state_path = app.resolve_state_path("core_dir", "appstate.json")
if not os.path.isfile(state_path):
return True
app.delete_state_item("telemetry")
created_at = app.get_state_item("created_at", None)
if not created_at:
state_stat = os.stat(state_path)
Expand Down Expand Up @@ -160,14 +150,6 @@ def after_upgrade(ctx):
"PlatformIO has been successfully upgraded to %s!\n" % __version__,
fg="green",
)
telemetry.log_event(
"pio_upgrade_core",
{
"label": "%s > %s" % (last_version_str, __version__),
"from_version": last_version_str,
"to_version": __version__,
},
)

return print_welcome_banner()

Expand Down
3 changes: 1 addition & 2 deletions platformio/platform/_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import click

from platformio import app, fs, proc, telemetry
from platformio import app, fs, proc
from platformio.compat import hashlib_encode_data
from platformio.package.manager.core import get_core_package_dir
from platformio.platform.exception import BuildScriptNotFound
Expand Down Expand Up @@ -60,7 +60,6 @@ def run( # pylint: disable=too-many-arguments
if not os.path.isfile(variables["build_script"]):
raise BuildScriptNotFound(variables["build_script"])

telemetry.log_platform_run(self, self.config, variables["pioenv"], targets)
result = self._run_scons(variables, targets, jobs)

assert "returncode" in result
Expand Down
3 changes: 0 additions & 3 deletions platformio/project/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ def load_build_metadata(project_dir, env_or_envs, cache=False, build_type=None):

def _load_build_metadata(project_dir, env_names, build_type=None):
# pylint: disable=import-outside-toplevel
from platformio import app
from platformio.run.cli import cli as cmd_run

args = ["--project-dir", project_dir, "--target", "__idedata"]
Expand All @@ -174,9 +173,7 @@ def _load_build_metadata(project_dir, env_names, build_type=None):
# args.extend(["--target", "__test"])
for name in env_names:
args.extend(["-e", name])
app.set_session_var("pause_telemetry", True)
result = CliRunner().invoke(cmd_run, args)
app.set_session_var("pause_telemetry", False)
if result.exit_code != 0 and not isinstance(
result.exception, exception.ReturnErrorCode
):
Expand Down
4 changes: 1 addition & 3 deletions platformio/remote/client/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from twisted.spread import pb # pylint: disable=import-error
from zope.interface import provider # pylint: disable=import-error

from platformio import __pioremote_endpoint__, __version__, app, exception, maintenance
from platformio import __pioremote_endpoint__, __version__, app, exception
from platformio.remote.factory.client import RemoteClientFactory
from platformio.remote.factory.ssl import SSLContextFactory

Expand Down Expand Up @@ -186,7 +186,5 @@ def cb_global_error(self, err):
"a remote machine using `pio remote agent start` command.\n"
"See http://docs.platformio.org/page/plus/pio-remote.html"
)
else:
maintenance.on_platformio_exception(Exception(err.type))
click.secho(msg, fg="red", err=True)
self.disconnect(exit_code=1)
Loading