feat(argocd): add posthog events for argocd connect form and environment access#2728
Conversation
…ent access Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## staging #2728 +/- ##
===========================================
- Coverage 46.98% 44.15% -2.84%
===========================================
Files 1193 599 -594
Lines 24905 14705 -10200
Branches 7292 4355 -2937
===========================================
- Hits 11702 6493 -5209
+ Misses 11168 7067 -4101
+ Partials 2035 1145 -890
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| const isEnvironmentManagedByArgoCd = isArgoCdEnvironment(environmentOverview?.[0]) | ||
|
|
||
| useEffect(() => { | ||
| if (isEnvironmentManagedByArgoCd) { |
There was a problem hiding this comment.
Not sure about this one, why we don't trigger an event when we see the environment is tagged with ArgoCD?
We try to avoid having too much useEffect in the code-base
There was a problem hiding this comment.
We want to track when a user access his argoCD environment not only when the environment is created.
by what it is the best to replace useEffect? Can we add a rule in the AGENTS.md because I noticed must of the time AI want to put useEffect everywhere
There was a problem hiding this comment.
On the /environment/:id/overview page you can see the “ArgoCD” tag, and in this request https://api.qovery.com/environment/205753b2-26f9-4bb0-a333-841976081865/services you can see the service_type ARGO_CD to track
Is it possible to track this from there? I feel it might not be necessary to add a custom event for it
BTW, we have already a rule about useEffect in our skill with all alternatives
There was a problem hiding this comment.
I can not track just with element displayed he has to perform an action on it. And not sure what you mean for the request because I don't have this information in posthog.
🙏🏻 thanks for the rule I am checking
There was a problem hiding this comment.
But here we just want to know if the user is on the environment overview with ArgoCD services, right? It’s more a page/view exposure than an action
If we can’t track it reliably from PostHog alone, useEffect sounds ok for this kind of analytics event
There was a problem hiding this comment.
YEs it is not possible directly in Posthog that's why I added a custom event.
Summary
Issue: QOV-1960
Add argoCD posthog events:
Testing
yarn testoryarn test -u(if you need to regenerate snapshots)yarn formatyarn lintPR Checklist
.cursor/rules)feat(service): add new Terraform service) - required for semantic-release