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

Analytics event tracking #296

Merged
merged 2 commits into from
Jun 8, 2020

Conversation

bodom0015
Copy link
Member

@bodom0015 bodom0015 commented Feb 3, 2020

Problem

We currently have no way of tracking user actions within the system. That is, given a set of users exercising the system, we are unable to track history of which applications were run or which actions were performed.

Moreover we have no way of knowing when users are encountering issues with a particular application.

Fixes #294

Approach

Add simple event tracking to monitor which buttons the user pushes on the Workbench Dashboard.

We can now track:

  • page views (present previously)
  • adding an application from the catalog
  • deleting your instance of an application
  • starting / stopping an application
  • viewing logs/config/console for an application's service
  • editing an application's service

NOTE: If we can think of other low-hanging analytics to track here, I am open to further suggestions 👍

How to Test

  • Prerequisites:
    • Disable Adblock / uBlock for https://www.local.ndslabs.org/dashboard
    • Configure Google Analytics with the tracking ID for CHEESEhub Dev (UA-156933757-2)
    • Open the Google Analytics Dashboard and view CHEESEhub Dev > Realtime > Events
  1. Checkout and deploy this branch locally
  2. Login to the Workbench Dashboard
  3. Navigate to the Catalog view
  4. Click Add to create an instance of an application from the Catalog
    • You should see an add Event appear in the GA Dashboard with the spec.key and a counter of how many times it was clicked
    • You should see the "View" button appear alongside "Add"
  5. Click View
    • You should be brought to the Applications Dashboard
  6. Expand your new application and click Edit, then go back
    • You should see an edit Event appear in the GA Dashboard with the svc.service and a counter of how many times it was clicked
    • You should be brought to the "Edit Stack Service" view
  7. Expand your application and click Launch
    • You should see a launch Event appear in the GA Dashboard with the stack.key and a counter of how many times it was clicked
    • Your application should begin to start
  8. Expand your application and click Config
    • You should see a config Event appear in the GA Dashboard with the svc.service and a counter of how many times it was clicked
    • You should be shown the config modal
  9. Expand your application and click Logs
    • You should see a logs Event appear in the GA Dashboard with the svc.service and a counter of how many times it was clicked
    • You should be shown the logs modal
  10. Expand your application and click Console, then go back
    • You should see a console Event appear in the GA Dashboard with the svc.service and a counter of how many times it was clicked
    • You should be brought to the "Application Service Console" view
  11. Wait for the application to finish launching, then expand your application and click Shutdown
    • You should see a shutdown Event appear in the GA Dashboard with the stack.key and a counter of how many times it was clicked
    • Your application should start to spin down
  12. Wait for the application to finish shutting down, then expand your application and click Remove
    • You should see a delete Event appear in the GA Dashboard with the stack.key and a counter of how many times it was clicked
    • Your application should be removed from the view

@bodom0015 bodom0015 merged commit 76a2e74 into nds-org:develop Jun 8, 2020
bodom0015 added a commit to cheese-hub/ndslabs that referenced this pull request Oct 8, 2020
* Add version 2.0 of client-go

* Stub pod and RC watching

* Add kubernetes go client to KubeHelper

* Get clean healthz result

* Migrate more operations over to go client

* Migrate GetLog to go client

* Mostly complete conversion to go client

* Initial fixes

* Just a reformat

* Removed unused PutDataset endpoint

* Changed Kubernetes version to 1.5

* Reverted change to Stream() call

* Migrate to mockable kubernetes Interface

* Updated event handling to use go client approach

* Added instructions to run apiserver out of cluster

* Added support for in-cluster configuration

* NDS-1172: Add -p flag to ndsctl to allow specification of password (nds-org#242)

* Roll versions forward to 1.0.14

* NDS-1172: Add -p flag to ndsctl to allow specification of password

* NDS-1177: Delete ingress rule before recreating it during stack modification

* NDS-1219: If stack is starting, StartStack should simply return 202 again

* NDS-1116: Adds oauth endpoint to apiserver (nds-org#246)

* Added admin port

* Added admin port

* Added oauth registration method

* Parameterized auth urls

* NDS-1127 / NDS-229: Globus Auth support for UI, refactor webui Docker build, remove Bower (nds-org#243)

* Roll versions forward to 1.0.14

* Sync.. starting to refactor webui Dockerfile(s)

* NDS-1127 / NDS-229: Rework Docker/Grunt build process, migrate away from using Bower

* Removed bower from package.json

* Removed Bower from base image

* Replace static file server rule for '/bower_components' with '/node_modules'

* Fix last few dependency issues from migration

* Fixed SwaggerUI view (again) and added a test case

* Removed the 'HTTP Basic' from 'HTTP Basic Authentication' on the dashboard

* Made the SwaggerUI test case actually useful

* Fixed an issue scrolling Docker image tags into view (addSpec)

* Fixed race condition in consolePage.get()

* Fixed erroneous comments

* Removed documentation about GIT_DROPIN feature

* Remove debian backports apt repo from Dockerfile

* Adjusted Docker image to read in SIGNIN_URL

* Adjusted Signin/Signout paths on LandingPage/Navbar

* Added banner / redirect to LoginPage / SignUpPage when OAuth is enabled

* Update README.md

* Create simple travis script to verify basics (nds-org#247)

* Update glide repos to fix sirupsen repo name change

* Changed default NDSLABS_APISERVER_SERVICE_PORT

to 30001

* Updated dependencies and imports

* Added better defaults for debugging

* Updated README to reflect current dev practices

* Added insecure postman collection

* Addressed review feedack

* Allow user to configure nodeSelector in Workbench apiserver

* Update entrypoint.sh to include new config values

nodeSelectorName / nodeSelectorValue

* Added new config for pvcStorageClass, new functions for Creating/Deleting PVCs in kube.go

* Create 'home' PVC when namespace is created, create vol/user PVCs when stack starts

* Removed references to glusterfs / HomeVolume, replaced with HomePvcSuffix

* Added a test case for a stack mounting a PVC

* Fixed HTTPS simple stack chaining/test case

* Added helpers to Create/Delete NetworkPolicy resources and check for their existence

* Improve NetworkPolicy error-handling slightly

* Updated PVC support to use SubPath from home PVC, instead of creating a new PVC every time

* Added new config for pvcStorageClass, new functions for Creating/Deleting PVCs in kube.go

* Create 'home' PVC when namespace is created, create vol/user PVCs when stack starts

* Removed references to glusterfs / HomeVolume, replaced with HomePvcSuffix

* Added a test case for a stack mounting a PVC

* Fixed HTTPS simple stack chaining/test case

* Updated PVC support to use SubPath from home PVC, instead of creating a new PVC every time

* Removed VOLUME_* variables and added HOME_PVC_SUFFIX

* Removed unused VolumeType

* Added default nfs storage class in entrypoint

* Added nginx ingress class for GKE

* Added Sphinx config

* Basic install instructions

* Added the volume.beta.kubernetes.io/nfs-mount-path annotation to the PersistentVolumeClaim

* Updated the base containers to Debian Stretch due to 404 errors when running apt-get on golang:1.8-jessie

* Check for error instead of nil

* Add support for more fine-grained container security capabilities

* Expand full.json example to show securityContext

* Fix merge conflict, further expand error-handling in StartStack

* Read subdomain_prefix from env instead of 'www'

* Removed last references to Privileged

* Don't re-pull dependencies if the --cache flag is passed

* Moved networkpolicy creation to stack (not service) level

* Gofmt

* Add check for existing network policy

* Added collocate spec option to support pod affinity on host

* Changed network policy pod selector to support access by ILB

* Disabled network policies

* Temporary fix to ensure spdy installed

* Implemented exec using go client

* Added QPS and Burst overrides

* Analytics event tracking (nds-org#296)

* Low-barrier platform instrumentation/tracking using Google Analytics events

* Fixed logs/console/edit/help/config event tracking

* Use Catalog as default page when first logging in (nds-org#313)

* Update Dashboard/Applications page names throughout, highlight current page in navbar (nds-org#314)

* Catalog: Remove help icon, revise text in help link on dropdown (nds-org#315)

* Catalog: Hide 'Add' button after installing once, highlight the 'View' button (nds-org#316)

* Added description to Dashboard page, changed red panels to grey (nds-org#317)

* Applications: Added tooltips to all buttons and columns (nds-org#318)

* Replace link icon with text, add margin (nds-org#319)

* Replace link icon with text, add margin

* Replace link icon with text, add margin

* Hide advanced features behind config flags (nds-org#320)

* Hide some of the more advanced features behind environment variables

* Fix default login path

* Show Console by default

* Added showLogs and showConfig flags

* Remove unused envvar

* fix bad merge

* Remove debug variable

* Update gui/README.md to correct Swagger codegen

Fixes nds-org#312

* Hide Terms&Conditions link on signup if no 'Acceptable Use Policy' link is provided (nds-org#321)

* Address SGCI Phase 2 Feedback (nds-org#324)

* Hide purple boxes on landing, consistent naming for signUp

* Move "See Also" from Landing to the "Help" dropdown on the navbar

* Adjust hint text, make list / card buttons slightly more obvious

* Highlight "Add" button, show popup when copying to clipboard, hide source when not needed

* Hide "Add Application" button on Dashboard view

* Increase size of Loading/Refresh icon

* Upgrade AngularJS to 1.8.0 (nds-org#322)

* Roll AngularJS forward to 1.7.9, update return signature for all uses of .then()

* Roll AngularJS forward to 1.8.0

* Bump lodash from 4.5.1 to 4.17.19 in /gui (nds-org#325)

Bumps [lodash](https://github.com/lodash/lodash) from 4.5.1 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.5.1...4.17.19)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Co-authored-by: BenGalewsky <[email protected]>
Co-authored-by: Craig Willis <[email protected]>
Co-authored-by: BenGalewsky <[email protected]>
Co-authored-by: Ben Galewsky <[email protected]>
Co-authored-by: Kevin Coakley <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
bodom0015 added a commit that referenced this pull request Apr 21, 2021
* Low-barrier platform instrumentation/tracking using Google Analytics events

* Fixed logs/console/edit/help/config event tracking
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.

1 participant