Skip to content

[telemetry] Add new telemetry.data config option for telemetry #10925

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

Merged
merged 1 commit into from
Jul 1, 2022

Conversation

Pothulapati
Copy link
Contributor

@Pothulapati Pothulapati commented Jun 27, 2022

Description

This PR adds a new experimental.telemetry.data.platform config option
that is then passed to GITPOD_INSTALLATION_PLATFORM env variable, which
is then transmitted by the gitpod-telemetry job as the platform
property into our telemetry store. The value of this env variable
is then overrided by each install method.

This env can have the following values:

  • installer by default as when the installation is done directly
    through the installer, We don't have enough information
    about the environment.
  • One of the distribution values
    when done through kots. This would have the distribution in which
    Gitpod is being installed, and is dependent on kots.
  • local-preview when the installation is done through the new
    preview install method.

As the changes show in the PR, each installation method overrides
the value.

Signed-off-by: Tarun Pothulapati [email protected]

Related Issue(s)

Fixes #10766

How to test

Check the gitpod-telemetry cronjob to have the new env, that is set
to the appropriate value based on the installation method

Release Notes

[telemetry] Add new telemetry.data config option for telemetry

Documentation

Werft options:

  • /werft with-preview

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-tar-preview-telemetry.1 because the annotations in the pull request description changed
(with .werft/ from main)

@Pothulapati Pothulapati force-pushed the tar/preview-telemetry branch from 88ce9d6 to 4f7a090 Compare June 27, 2022 10:33
@Pothulapati
Copy link
Contributor Author

Pothulapati commented Jun 27, 2022

/werft run

👍 started the job as gitpod-build-tar-preview-telemetry.3
(with .werft/ from main)

@Pothulapati Pothulapati force-pushed the tar/preview-telemetry branch from 4f7a090 to 35e871b Compare June 27, 2022 10:55
@Pothulapati
Copy link
Contributor Author

Pothulapati commented Jun 27, 2022

/werft run

👍 started the job as gitpod-build-tar-preview-telemetry.6
(with .werft/ from main)

@Pothulapati
Copy link
Contributor Author

Pothulapati commented Jun 27, 2022

/werft run

👍 started the job as gitpod-build-tar-preview-telemetry.7
(with .werft/ from main)

@Pothulapati Pothulapati force-pushed the tar/preview-telemetry branch from 7ba7af9 to f1c2689 Compare June 29, 2022 08:21
@Pothulapati
Copy link
Contributor Author

Pothulapati commented Jun 29, 2022

/werft run publish-to-kots

👍 started the job as gitpod-build-tar-preview-telemetry.11
(with .werft/ from main)

@Pothulapati
Copy link
Contributor Author

Pothulapati commented Jun 30, 2022

/werft run publish-to-kots

👍 started the job as gitpod-build-tar-preview-telemetry.13
(with .werft/ from main)

@Pothulapati Pothulapati force-pushed the tar/preview-telemetry branch from 3b9afb3 to 0182d4e Compare June 30, 2022 12:03
@Pothulapati
Copy link
Contributor Author

Pothulapati commented Jun 30, 2022

/werft run publish-to-kots

👍 started the job as gitpod-build-tar-preview-telemetry.15
(with .werft/ from main)

@Pothulapati Pothulapati marked this pull request as ready for review June 30, 2022 13:36
@Pothulapati Pothulapati requested a review from a team June 30, 2022 13:36
@Pothulapati Pothulapati requested a review from mrsimonemms June 30, 2022 13:36
@github-actions github-actions bot added the team: delivery Issue belongs to the self-hosted team label Jun 30, 2022
@Pothulapati
Copy link
Contributor Author

/hold

Copy link
Contributor

@mrsimonemms mrsimonemms left a comment

Choose a reason for hiding this comment

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

/hold

Looks fine. I've approved with a comment - your choice what you do with it

@@ -56,6 +56,11 @@ var sendCmd = &cobra.Command{
Set("totalWorkspaces", data.TotalWorkspaces).
Set("totalInstances", data.TotalInstances)

platform := os.Getenv("GITPOD_INSTALLATION_PLATFORM")
if platform != "" {
properties.Set("platform", platform)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to leave the platform as blank in the Segment data, or do we want something like unknown in there?

@roboquat roboquat added size/M and removed size/S labels Jul 1, 2022
@Pothulapati Pothulapati force-pushed the tar/preview-telemetry branch from f308f63 to 34b991d Compare July 1, 2022 07:34
@Pothulapati
Copy link
Contributor Author

Pothulapati commented Jul 1, 2022

/werft run publish-to-kots

👍 started the job as gitpod-build-tar-preview-telemetry.18
(with .werft/ from main)

@Pothulapati Pothulapati force-pushed the tar/preview-telemetry branch 2 times, most recently from 1fbebc6 to b9591f7 Compare July 1, 2022 07:48
@Pothulapati Pothulapati force-pushed the tar/preview-telemetry branch 2 times, most recently from 669c002 to 1b4e129 Compare July 1, 2022 08:14
@Pothulapati
Copy link
Contributor Author

Pothulapati commented Jul 1, 2022

/werft run publish-to-kots

👍 started the job as gitpod-build-tar-preview-telemetry.23
(with .werft/ from main)

@Pothulapati
Copy link
Contributor Author

Pothulapati commented Jul 1, 2022

Tested this on both local-preview and kots, and the values are set as expected

  • local-preview
Environment:
      GITPOD_INSTALLATION_VERSION:   tar-preview-telemetry.23
      GITPOD_INSTALLATION_PLATFORM:  local-preview
      SERVER_URL:                    http://server.default.svc.cluster.local:9000/
    Mounts:                          <none>
  • kots on a k3s cluster
    Environment:
      GITPOD_INSTALLATION_VERSION:   tar-preview-telemetry.23
      GITPOD_INSTALLATION_PLATFORM:  k3s
      SERVER_URL:                    http://server.gitpod.svc.cluster.local:9000
    Mounts:                          <none>
  Volumes:                           <none>

Also, Verified that our telemetry store is receving the new property as expected!

@Pothulapati Pothulapati changed the title [telemetry] Add new GITPOD_INSTALLATION_PLATFORM telemetry variable [telemetry] Add new data.platform config option for telemetry Jul 1, 2022
@Pothulapati Pothulapati changed the title [telemetry] Add new data.platform config option for telemetry [telemetry] Add new telemetry.data config option for telemetry Jul 1, 2022
Copy link
Contributor

@corneliusludmann corneliusludmann left a comment

Choose a reason for hiding this comment

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

Looks good! 🚀 Thanks for taking my comments into consideration! 🧡

@Pothulapati Pothulapati force-pushed the tar/preview-telemetry branch from 1b4e129 to 66bd0f1 Compare July 1, 2022 09:08
Fixes #10766

This PR adds a new `experimental.telemetry.data.platform` config option
that is then passed to `GITPOD_INSTALLATION_PLATFORM` env variable, which
is then transmitted by the `gitpod-telemetry` job as the `platform`
property into our telemetry store. The value of this env variable
is then overrided by each install method.

This env can have the following values:
- `installer` by default as when the installation is done directly
  through the installer, We don't have enough information
   about the environment.
-  [One of the `distribution` values](https://docs.replicated.com/reference/template-functions-static-context#distribution)
   when done through `kots`. This would have the distribution in which
   Gitpod is being installed, and is dependent on `kots`.
- `local-preview` when the installation is done through the new
   preview install method.

As the changes show in the PR, each installation method overrides
the value.

Signed-off-by: Tarun Pothulapati <[email protected]>
@Pothulapati Pothulapati force-pushed the tar/preview-telemetry branch from 66bd0f1 to 2f7eaa8 Compare July 1, 2022 09:10
@Pothulapati
Copy link
Contributor Author

/unhold

@roboquat roboquat merged commit c96adbe into main Jul 1, 2022
@roboquat roboquat deleted the tar/preview-telemetry branch July 1, 2022 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note size/M team: delivery Issue belongs to the self-hosted team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Platform information in gitpod telemetry
4 participants