Skip to content

Conversation

opudrovs
Copy link
Contributor

@opudrovs opudrovs commented Nov 24, 2022

Closes weaveworks/weave-gitops#2843
Closes weaveworks/weave-gitops#2452
Closes #1622

  • Added turning analytics on by default during the first gitops CLI run.
  • Added tracking events with Pendo if analytics is on.

@opudrovs opudrovs added enhancement New feature or request team/denim labels Nov 24, 2022
@opudrovs opudrovs force-pushed the 2843-auto-analytics branch 2 times, most recently from 6104bcf to 0d1c4c9 Compare November 24, 2022 13:03
@opudrovs opudrovs marked this pull request as ready for review November 24, 2022 13:21
@opudrovs opudrovs requested review from ozamosi and foot November 24, 2022 13:25
@opudrovs
Copy link
Contributor Author

Tested it locally, it looks like everything is working as expected.

@opudrovs
Copy link
Contributor Author

opudrovs commented Nov 24, 2022

reqBodyDatasubmitted to Pendo for sample command (printed when using a test branch of OSS, but except for the print debug message it's the same as main):

olga@macbook-pro podinfo % /Volumes/Macintosh_HD_Data/_job_ww/_src/weave-gitops-enterprise/cmd/gitops/gitops version
reqBodyData:
{
  "type": "track",
  "event": "version",
  "visitorId": "Sx1qgbkqZ7",
  "timestamp": 1669295887008,
  "properties": {
    "app": "cli",
    "tier": "enterprise",
    "version": "v0.10.3-rc.1-20-g0d1c4c92"
  }
}
Current Version: v0.10.3-rc.1-20-g0d1c4c92
GitCommit: 0d1c4c92
BuildTime: 2022-11-24_14:11:24
Branch: 2843-auto-analytics
olga@macbook-pro podinfo % 

or

reqBodyData:
{
  "type": "track",
  "event": "set config",
  "visitorId": "Sx1qgbkqZ7",
  "timestamp": 1669295848555,
  "properties": {
    "app": "cli",
    "tier": "enterprise",
    "version": "v0.10.3-rc.1-20-g0d1c4c92"
  }
}

or

olga@macbook-pro podinfo % /Volumes/Macintosh_HD_Data/_job_ww/_src/weave-gitops-enterprise/cmd/gitops/gitops delete clusters dfdrg  --title=dvsftbybnghn
reqBodyData:
{
  "type": "track",
  "event": "delete cluster",
  "visitorId": "Sx1qgbkqZ7",
  "timestamp": 1669296270736,
  "properties": {
    "app": "cli",
    "flag_title": true,
    "tier": "enterprise",
    "version": "v0.10.3-rc.1-20-g0d1c4c92"
  }
}

Makefile Outdated
@@ -196,3 +197,4 @@ tools/core-files/charts/gitops-server/Chart.yaml: tools/core-files/Makefile.$(CO

echo-ldflags: tools/core-files/charts/gitops-server/Chart.yaml tools/core-files/Makefile.$(CORE_REVISION)
@make --no-print-directory -f Makefile.core -C tools/core-files echo-ldflags VERSION="$(VERSION)-Enterprise-Edition-$(CORE_REVISION)"
@make --no-print-directory -f Makefile.core -C tools/core-files echo-ldflags TIER="$(TIER)"
Copy link
Contributor

Choose a reason for hiding this comment

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

You need to add the TIER variable to the end of the line above and only call make once - otherwise you'll over-write the version with the OSS version here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed!

Add the `TIER` LDFLAG.
@opudrovs opudrovs force-pushed the 2843-auto-analytics branch from 0d1c4c9 to bd75bc2 Compare November 24, 2022 13:43
@opudrovs opudrovs merged commit d5025e4 into main Nov 24, 2022
@opudrovs opudrovs deleted the 2843-auto-analytics branch November 24, 2022 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Interactively turn on pendo at first run Add Pendo to Weave GitOps Enterprise CLI Add Pendo Track Events for Weave GitOps CLI
2 participants