[PR #275] [CLOSED] refactor(proxy): extract telemetry types to metrics.go #430

Closed
opened 2026-04-12 06:41:37 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fosrl/newt/pull/275
Author: @LaurenceJJones
Created: 3/16/2026
Status: Closed

Base: devHead: refactor/proxy-extract-metrics


📝 Commits (2)

  • d615866 refactor(proxy): extract telemetry types to metrics.go
  • 525110c refactor(proxy): preserve telemetry error classification

📊 Changes

2 files changed (+161 additions, -162 deletions)

View changed files

📝 proxy/manager.go (+10 -162)
proxy/metrics.go (+151 -0)

📄 Description

Community Contribution License Agreement

By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.

Description

  • Move tunnelEntry struct to metrics.go
  • Move countingWriter struct and Write method to metrics.go
  • Move classifyProxyError function to metrics.go
  • Add flush() method to tunnelEntry for cleaner byte flushing
  • Add buildAttrs() method to tunnelEntry for attribute initialization
  • Update countingWriter to use asyncBytes and entry fields
  • Simplify flushLoop and ClearTunnelID to use flush() method

How to test?

Internal code 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/fosrl/newt/pull/275 **Author:** [@LaurenceJJones](https://github.com/LaurenceJJones) **Created:** 3/16/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `refactor/proxy-extract-metrics` --- ### 📝 Commits (2) - [`d615866`](https://github.com/fosrl/newt/commit/d615866a631476c25c1f1723af092c884a56b2b3) refactor(proxy): extract telemetry types to metrics.go - [`525110c`](https://github.com/fosrl/newt/commit/525110cfc7b957b67a1b5d47080b6e947d944733) refactor(proxy): preserve telemetry error classification ### 📊 Changes **2 files changed** (+161 additions, -162 deletions) <details> <summary>View changed files</summary> 📝 `proxy/manager.go` (+10 -162) ➕ `proxy/metrics.go` (+151 -0) </details> ### 📄 Description ## Community Contribution License Agreement By creating this pull request, I grant the project maintainers an unlimited, perpetual license to use, modify, and redistribute these contributions under any terms they choose, including both the AGPLv3 and the Fossorial Commercial license terms. I represent that I have the right to grant this license for all contributed content. ## Description - Move tunnelEntry struct to metrics.go - Move countingWriter struct and Write method to metrics.go - Move classifyProxyError function to metrics.go - Add flush() method to tunnelEntry for cleaner byte flushing - Add buildAttrs() method to tunnelEntry for attribute initialization - Update countingWriter to use asyncBytes and entry fields - Simplify flushLoop and ClearTunnelID to use flush() method ## How to test? Internal code changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-12 06:41:37 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/newt#430