[PR #384] [MERGED] feat: add active request tracking to health check and dispatch routes #477

Closed
opened 2026-02-16 01:16:05 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-daemon/pull/384
Author: @Yeuoly
Created: 7/4/2025
Status: Merged
Merged: 7/4/2025
Merged by: @Yeuoly

Base: mainHead: feat/collect-active-requests


📝 Commits (1)

  • 7e2c473 feat: add active request tracking to health check and dispatch routes

📊 Changes

2 files changed (+32 additions, -5 deletions)

View changed files

📝 internal/server/controllers/health_check.go (+30 -5)
📝 internal/server/http_server.go (+2 -0)

📄 Description

  • Implemented middleware to track active requests and active dispatch requests using atomic counters.
  • Updated health check response to include counts of active requests and active dispatch requests.
  • Integrated the new middleware into the HTTP server and plugin dispatch group for improved monitoring.

Description

Please provide a brief description of the changes made in this pull request.
Please also include the issue number if this is related to an issue using the format Fixes #123 or Closes #123.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Performance improvement
  • Other

Essential Checklist

Testing

  • I have tested the changes locally and confirmed they work as expected
  • I have added unit tests where necessary and they pass successfully

Bug Fix (if applicable)

  • I have used GitHub syntax to close the related issue (e.g., Fixes #123 or Closes #123)

Additional Information

Please provide any additional context that would help reviewers understand the changes.


🔄 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/langgenius/dify-plugin-daemon/pull/384 **Author:** [@Yeuoly](https://github.com/Yeuoly) **Created:** 7/4/2025 **Status:** ✅ Merged **Merged:** 7/4/2025 **Merged by:** [@Yeuoly](https://github.com/Yeuoly) **Base:** `main` ← **Head:** `feat/collect-active-requests` --- ### 📝 Commits (1) - [`7e2c473`](https://github.com/langgenius/dify-plugin-daemon/commit/7e2c4739abed20d5cab98f90837db9ec550d1691) feat: add active request tracking to health check and dispatch routes ### 📊 Changes **2 files changed** (+32 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `internal/server/controllers/health_check.go` (+30 -5) 📝 `internal/server/http_server.go` (+2 -0) </details> ### 📄 Description - Implemented middleware to track active requests and active dispatch requests using atomic counters. - Updated health check response to include counts of active requests and active dispatch requests. - Integrated the new middleware into the HTTP server and plugin dispatch group for improved monitoring. ## Description Please provide a brief description of the changes made in this pull request. Please also include the issue number if this is related to an issue using the format `Fixes #123` or `Closes #123`. ## Type of Change - [ ] Bug fix - [ ] New feature - [ ] Refactor - [ ] Performance improvement - [ ] Other ## Essential Checklist ### Testing - [ ] I have tested the changes locally and confirmed they work as expected - [ ] I have added unit tests where necessary and they pass successfully ### Bug Fix (if applicable) - [ ] I have used GitHub syntax to close the related issue (e.g., `Fixes #123` or `Closes #123`) ## Additional Information Please provide any additional context that would help reviewers understand the changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 01:16:05 -05:00
yindo closed this issue 2026-02-16 01:16:05 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#477