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

feat!: Adds telemetry client calls to worker #42

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

marofke
Copy link
Contributor

@marofke marofke commented Sep 26, 2023

Note: Depends on aws-deadline/deadline-cloud#60

What was the problem/requirement? (What/Why)

We want to gain insights into how our customers use our software.

What was the solution? (How)

Use the Telemetry Client introduced in the Deadline Cloud Client Library, since it's a requirement for the Worker Agent already. We introduce an installer option to opt out of telemetry collection if customers choose, which calls the client lib to set the config setting.

What is the impact of this change?

We can now collect simple startup data on Worker machines, so we know what kinds of machines typically get used for worker flows.

Further, the worker installer bash script was updated a bit to refactor the bin directory we search for installed programs, since we need to call the Deadline client lib to set the telemetry opt out option.

How was this change tested?

  • included the changes from feat!: Adds more telemetry events deadline-cloud#60
  • built locally, and confirmed telemetry events were sent to our backend, and ensured none were sent through unit tests
  • installed all the packages on a fresh linux EC2 instance, and confirmed that telemetry opt out works as an installer option
[ec2-user@ip-172-31-20-107 ~]$ python -m venv /tmp/tmp-env
[ec2-user@ip-172-31-20-107 ~]$ source /tmp/tmp-env/bin/activate
(tmp-env) [ec2-user@ip-172-31-20-107 ~]$ pip install openjd_model-0.1.1-py3-none-any.whl openjd_sessions-0.2.0-py3-none-any.whl deadline-0.28.0.post1+g3f40b9e-py3-none-any.whl deadline_cloud_worker_agent-0.14.1.post4+gcb4fe9f.d20230926-py3-none-any.whl
(tmp-env) [ec2-user@ip-172-31-20-107 ~]$ install-deadline-worker --farm-id $FARM --fleet-id $FLEET --telemetry-opt-out --no-install-service
===========================================================
|      Amazon Deadline Cloud Worker Agent Installer       |
===========================================================

Farm ID: farm-56bc3eb734a24cbf871985aa2221597f
Fleet ID: fleet-3e9ba17545f040cc8d83502b82251242
Region: us-west-2
Worker agent user: deadline-worker-agent
Worker job group: deadline-job-users
Scripts path: /tmp/tmp-env/bin
Worker agent program path: /tmp/tmp-env/bin/deadline-worker-agent
Worker agent program path: /tmp/tmp-env/bin/deadline
Allow worker agent shutdown: no
Start systemd service: no
Telemetry opt-out: yes
Confirm install with the above settings (y/n):y

Worker agent user deadline-worker-agent already exists
Job group deadline-job-users already exists
Worker agent user (deadline-worker-agent) is alread in job group (deadline-job-users)
No prior sudoers shutdown rule at /etc/sudoers.d/deadline-worker-shutdown
Provisioning log directory (/var/log/amazon/deadline)
Done provisioning log directory (/var/log/amazon/deadline)
Provisioning persistence directory (/var/lib/deadline)
Done provisioning persistence directory (/var/lib/deadline)
Provisioning configuration directory (/etc/amazon/deadline)
Done provisioning configuration directory
Configuring farm and fleet
Done configuring farm and fleet
Opting out of telemetry collection
Done
(tmp-env) [ec2-user@ip-172-31-20-107 ~]$ sudo cat /home/deadline-worker-agent/.deadline/config
[telemetry]
opt_out = true

Was this change documented?

N/A

Is this a breaking change?

Yes, since the installer script interface changed

@marofke marofke force-pushed the marofke/telemetry-client branch 2 times, most recently from 62af42e to 8344656 Compare September 27, 2023 15:22
@marofke marofke changed the title feat: Adds telemetry client calls to worker feat!: Adds telemetry client calls to worker Sep 27, 2023
@marofke marofke force-pushed the marofke/telemetry-client branch from 8344656 to 7a73a46 Compare September 29, 2023 15:29
Copy link

@crowecawcaw crowecawcaw left a comment

Choose a reason for hiding this comment

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

Where do we only send telemetry when its configured to be one? I might be missing something obvious. Is opt-in/out handled in another component?

@marofke marofke force-pushed the marofke/telemetry-client branch 2 times, most recently from 19653c4 to 27bc7ee Compare September 29, 2023 18:22
@marofke marofke marked this pull request as ready for review September 29, 2023 18:23
@marofke marofke requested a review from a team as a code owner September 29, 2023 18:23
@marofke marofke force-pushed the marofke/telemetry-client branch from 27bc7ee to 5977949 Compare September 29, 2023 18:38
@marofke marofke merged commit 1e96738 into mainline Sep 29, 2023
8 checks passed
gmchale79 pushed a commit that referenced this pull request Oct 31, 2023
Signed-off-by: Caden Marofke <[email protected]>
Signed-off-by: Graeme McHale <[email protected]>
gmchale79 pushed a commit that referenced this pull request Nov 2, 2023
Signed-off-by: Caden Marofke <[email protected]>
Signed-off-by: Graeme McHale <[email protected]>
gahyusuh pushed a commit that referenced this pull request Nov 6, 2023
Signed-off-by: Caden Marofke <[email protected]>
Signed-off-by: Graeme McHale <[email protected]>
Signed-off-by: Gahyun Suh <[email protected]>
gmchale79 pushed a commit that referenced this pull request Feb 12, 2024
Signed-off-by: Caden Marofke <[email protected]>
Signed-off-by: Graeme McHale <[email protected]>
gmchale79 pushed a commit that referenced this pull request Mar 11, 2024
Signed-off-by: Caden Marofke <[email protected]>
Signed-off-by: Graeme McHale <[email protected]>
jusiskin pushed a commit to jusiskin/deadline-cloud-worker-agent that referenced this pull request Sep 4, 2024
…ws-deadline#42)

Updates the requirements on [pytest-xdist](https://github.com/pytest-dev/pytest-xdist) to permit the latest version.
- [Release notes](https://github.com/pytest-dev/pytest-xdist/releases)
- [Changelog](https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst)
- [Commits](pytest-dev/pytest-xdist@v3.3.0...v3.5.0)

---
updated-dependencies:
- dependency-name: pytest-xdist
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

5 participants