[GH-ISSUE #5089] [Feature Request] Get traffic metrics via httpPlugins ops callback #3995

Closed
opened 2026-05-05 14:32:23 -06:00 by gitea-mirror · 8 comments
Owner

Originally created by @gregoiregentil on GitHub (Dec 9, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/5089

Describe the feature request

THank you (again) for this great project.

I'm aware of enablePromotheus (which I have enabled) and I would like to get traffic usage, aka. transferred byte amount via:
httpPlugins
ops = ["CloseProxy"]

The promotheus interface does show:
frp_server_traffic_in{name="myname",type="tcp"} 2055
so the information is "there"

Have I missed an option or a meta that would already exist to get such traffic info in httpPplugins for that specific proxy?

Otherwise, could it be implemented? Or could I get some guidance how to patch?

Describe alternatives you've considered

No alternatives known.

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @gregoiregentil on GitHub (Dec 9, 2025). Original GitHub issue: https://github.com/fatedier/frp/issues/5089 ### Describe the feature request THank you (again) for this great project. I'm aware of enablePromotheus (which I have enabled) and I would like to get traffic usage, aka. transferred byte amount via: [[httpPlugins]] ops = ["CloseProxy"] The promotheus interface does show: frp_server_traffic_in{name="myname",type="tcp"} 2055 so the information is "there" Have I missed an option or a meta that would already exist to get such traffic info in httpPplugins for that specific proxy? Otherwise, could it be implemented? Or could I get some guidance how to patch? ### Describe alternatives you've considered No alternatives known. ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [x] Server Plugin - [x] Extensions - [ ] Others
gitea-mirror 2026-05-05 14:32:23 -06:00
Author
Owner

@fatedier commented on GitHub (Dec 9, 2025):

Currently we do not have plans to expose statistics at the plugin layer. Plugins are mainly intended for extending control-plane functionality rather than for exposing metrics.

<!-- gh-comment-id:3629970120 --> @fatedier commented on GitHub (Dec 9, 2025): Currently we do not have plans to expose statistics at the plugin layer. Plugins are mainly intended for extending control-plane functionality rather than for exposing metrics.
Author
Owner

@gregoiregentil commented on GitHub (Dec 9, 2025):

Can you guide how and where to patch? Is it complicated or is it just adding some "pipes"? Because calculation and data already exist...

<!-- gh-comment-id:3630658722 --> @gregoiregentil commented on GitHub (Dec 9, 2025): Can you guide how and where to patch? Is it complicated or is it just adding some "pipes"? Because calculation and data already exist...
Author
Owner

@fatedier commented on GitHub (Dec 9, 2025):

If you want to modify the code yourself, it should be relatively easy now with the help of AI tools.

<!-- gh-comment-id:3630728368 --> @fatedier commented on GitHub (Dec 9, 2025): If you want to modify the code yourself, it should be relatively easy now with the help of AI tools.
Author
Owner

@gregoiregentil commented on GitHub (Dec 9, 2025):

Great answer! We are just wasting keystrokes...

<!-- gh-comment-id:3630777975 --> @gregoiregentil commented on GitHub (Dec 9, 2025): Great answer! We are just wasting keystrokes...
Author
Owner

@github-actions[bot] commented on GitHub (Dec 24, 2025):

Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d of inactivity and eventually close.

<!-- gh-comment-id:3688294780 --> @github-actions[bot] commented on GitHub (Dec 24, 2025): Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d of inactivity and eventually close.
Author
Owner

@gregoiregentil commented on GitHub (Dec 24, 2025):

The proposed pull-request has been successfully tested.

<!-- gh-comment-id:3688332186 --> @gregoiregentil commented on GitHub (Dec 24, 2025): The proposed pull-request has been successfully tested.
Author
Owner

@fatedier commented on GitHub (Dec 24, 2025):

Currently we do not have plans to expose statistics at the plugin layer. Plugins are mainly intended for extending control-plane functionality rather than for exposing metrics.

<!-- gh-comment-id:3688418208 --> @fatedier commented on GitHub (Dec 24, 2025): > Currently we do not have plans to expose statistics at the plugin layer. Plugins are mainly intended for extending control-plane functionality rather than for exposing metrics.
Author
Owner

@github-actions[bot] commented on GitHub (Jan 8, 2026):

Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d of inactivity and eventually close.

<!-- gh-comment-id:3721423836 --> @github-actions[bot] commented on GitHub (Jan 8, 2026): Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d of inactivity and eventually close.
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: github-starred/frp#3995
No description provided.