Skip to content

feat(helm): add pre-start and post-start hooks for installation analytics #151

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 7 commits into from
Apr 4, 2025

Conversation

Shailesh-714
Copy link
Contributor

@Shailesh-714 Shailesh-714 commented Mar 26, 2025

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Added a webhook notifier for pre- and post-installation of hyperswitch-helm. This webhook sends the following API call to https://hyperswitch.gateway.scarf.sh:

  • initiated (when a user tries to install hyperswitch)
  • success (when all the components are successfully up and running)
  • error (when any of the component fails or the server is unreachable)

The API calls include information about the platform(docker/helm/cdk), version and additional information about success/failure.

Motivation and Context

This change enables tracking of installation attempts, providing valuable insights into user adoption and setup experience. By monitoring success and failure rates, we can identify and resolve potential setup issues, ultimately improving user experience.

How did you test it?

  1. Create a mock server and replace the url of the mock server inplace of WEBHOOK_URL in prestart-hook.yaml and poststart-hook.yaml
  2. Run helm install hypers-v1 . -n hyperswitch
  3. You can verify the status responses about your installation in your mock server.
Screenshot 2025-03-26 at 7 19 16 PM

Checklist

  • I reviewed the submitted code

@Shailesh-714 Shailesh-714 changed the title Webhook notifiers feat(helm): add pre-start and post-start hooks for installation tracking Mar 27, 2025
@inventvenkat inventvenkat changed the title feat(helm): add pre-start and post-start hooks for installation tracking feat(helm): add pre-start and post-start hooks for installation analytics Mar 27, 2025
WEBHOOK_URL="https://hyperswitch.gateway.scarf.sh/$PLATFORM"

MAX_RETRIES=30 # Maximum attempts before exiting
SLEEP_INTERVAL=2 # Wait time in seconds
Copy link
Collaborator

Choose a reason for hiding this comment

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

this variable is not used.

VERSION="{{ .Chart.Version }}"
STATUS=""
SERVER_HEALTH_URL="http://hyperswitch-server:80/health"
HYPERSWITCH_URL="http://hyperswitch-server:80/health/ready"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Change the name to HYPERSWITCH_DEEP_HEALTH_URL

@inventvenkat inventvenkat merged commit a1f9211 into main Apr 4, 2025
@Shailesh-714 Shailesh-714 deleted the webhooks branch April 24, 2025 08:34
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.

3 participants