Open jpellizzari opened 1 year ago
Here is the initial Pendo integration PR which might provide more context: https://github.com/weaveworks/weave-gitops/pull/2652
This completely abuses the feature flag system
I'm glad the author and I agree :). Some tech debt we need to pay down.
@jpellizzari Can you review this as part of "common UI" topics?
With telemetry turned on and no
flags.ACCOUNT_ID
present, the UI explodes.This line can resolve to
undefined
or some other value that does not have a.match
method:https://github.com/weaveworks/weave-gitops/blob/661f3f27f1e97ccf0aa94b8c8658dea7a2f5e883/ui/components/Pendo.tsx#L89
In general, we should not be passing data as a feature flag. These flags should be
true/false
to enable or disable parts of the UI. OurPENDO_ACCOUNT_ID
should be some sort of env var or secret.In addition, it appears we are relying on some magic strings on the backend to generate the token:
https://github.com/weaveworks/weave-gitops/blob/661f3f27f1e97ccf0aa94b8c8658dea7a2f5e883/pkg/telemetry/telemetry.go#L28
There appears to be some sort of encryption/hashing happening here, but then that value would be decrypted and sent in plain text to the Pendo API. I would have to consult the Pendo docs to understand if this is a suggested approach or not.
It is also a bit odd that we are using the
Namespace.UID
as an input to the hasing.