[PR #4048] [MERGED] feat: healthcheck for external services #4642

Closed
opened 2026-03-17 02:09:40 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/4048
Author: @balub
Created: 5/7/2024
Status: Merged
Merged: 5/7/2024
Merged by: @balub

Base: release/2024.3.3Head: feat/healthcheck-db


📝 Commits (4)

  • ff54fd9 chore: installed terminus package and scaffolded the health module
  • 145465b feat: added healthcheck for database with prisma
  • ff82572 chore: renamed label from prisma to database in health check route
  • 3b94af8 chore: reverted target of hopp-old-backend service to prod

📊 Changes

5 files changed (+142 additions, -0 deletions)

View changed files

📝 packages/hoppscotch-backend/package.json (+1 -0)
📝 packages/hoppscotch-backend/src/app.module.ts (+2 -0)
packages/hoppscotch-backend/src/health/health.controller.ts (+24 -0)
packages/hoppscotch-backend/src/health/health.module.ts (+10 -0)
📝 pnpm-lock.yaml (+105 -0)

📄 Description

Closes HSB-436
Closes #3830

Description

In this PR we are adding health checks to external services used by the hopscotch backend. We introduce a new route /health which when called will return the status of the service in the following result.

{
  "status": "ok",
  "info": {
    "database": {
      "status": "up"
    }
  },
  "error": {},
  "details": {
    "database": {
      "status": "up"
    }
  }
}

Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

Additional Information


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/4048 **Author:** [@balub](https://github.com/balub) **Created:** 5/7/2024 **Status:** ✅ Merged **Merged:** 5/7/2024 **Merged by:** [@balub](https://github.com/balub) **Base:** `release/2024.3.3` ← **Head:** `feat/healthcheck-db` --- ### 📝 Commits (4) - [`ff54fd9`](https://github.com/hoppscotch/hoppscotch/commit/ff54fd9e59e1697f6bd83c67fef8c2db75e0d3bd) chore: installed terminus package and scaffolded the health module - [`145465b`](https://github.com/hoppscotch/hoppscotch/commit/145465b35850f1c98f99ec9c34ef3ea1be5cb888) feat: added healthcheck for database with prisma - [`ff82572`](https://github.com/hoppscotch/hoppscotch/commit/ff82572e4a8902c27b1f55134c30405508daf522) chore: renamed label from prisma to database in health check route - [`3b94af8`](https://github.com/hoppscotch/hoppscotch/commit/3b94af8d96aa1824f27642d7892ebac2bc323586) chore: reverted target of hopp-old-backend service to prod ### 📊 Changes **5 files changed** (+142 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-backend/package.json` (+1 -0) 📝 `packages/hoppscotch-backend/src/app.module.ts` (+2 -0) ➕ `packages/hoppscotch-backend/src/health/health.controller.ts` (+24 -0) ➕ `packages/hoppscotch-backend/src/health/health.module.ts` (+10 -0) 📝 `pnpm-lock.yaml` (+105 -0) </details> ### 📄 Description <!-- Thanks for creating this pull request 🤗 Please make sure that the pull request is limited to one type (docs, feature, etc.) and keep it as small as possible. You can open multiple prs instead of opening a huge one. --> <!-- If this pull request closes an issue, please mention the issue number below --> Closes HSB-436 Closes #3830 ### Description <!-- Add a brief description of the pull request --> In this PR we are adding health checks to external services used by the hopscotch backend. We introduce a new route `/health` which when called will return the status of the service in the following result. ``` { "status": "ok", "info": { "database": { "status": "up" } }, "error": {}, "details": { "database": { "status": "up" } } } ``` <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [ ] Not Completed - [x] Completed --> ### Checks <!-- Make sure your pull request passes the CI checks and do check the following fields as needed - --> - [x] My pull request adheres to the code style of this project - [ ] My code requires changes to the documentation - [ ] I have updated the documentation as required - [x] All the tests have passed ### Additional Information <!-- Any additional information like breaking changes, dependencies added, screenshots, comparisons between new and old behaviour, etc. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:09:40 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4642
No description provided.