Skip to content

refactor(proxy): extract telemetry types to metrics.go#275

Open
LaurenceJJones wants to merge 2 commits intofosrl:devfrom
LaurenceJJones:refactor/proxy-extract-metrics
Open

refactor(proxy): extract telemetry types to metrics.go#275
LaurenceJJones wants to merge 2 commits intofosrl:devfrom
LaurenceJJones:refactor/proxy-extract-metrics

Conversation

@LaurenceJJones
Copy link
Copy Markdown
Member

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.

- 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
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.

1 participant