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

Track printer profile information #4847

Open
wants to merge 1 commit into
base: maintenance
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/octoprint/plugins/tracking/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ def _track_pong(self):
)
)

payload["printer_profile_count"] = len(self._printer_profile_manager.get_all())

self._track("pong", body=True, **payload)

def _track_startup(self):
Expand Down Expand Up @@ -473,6 +475,13 @@ def _track_printer_event(self, event, payload):
if self._printer_connection_parameters:
args["printer_port"] = self._printer_connection_parameters["port"]
args["printer_baudrate"] = self._printer_connection_parameters["baudrate"]

profile = self._printer_profile_manager.get_current().copy()
for k in ["id", "name", "model"]:
# Scrub these out since they could be identifiable information
profile.pop(k)
args["printer_profile"] = profile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That will need a further deep dive to be flattened. We cannot push hierarchical data like this over to the tracking subsystem, it will end up as one repr string, completely unsearchable or otherwise usable.

I suggest we concentrate on some key infos like extruder count, bed size, presence of heated bed and heated chamber?


self._track("printer_connected", **args)

def _track_printer_safety_event(self, event, payload):
Expand Down