Skip to content

Conversation

hgiasac
Copy link

@hgiasac hgiasac commented May 14, 2025

  • Replaced the global websocketStats instance (globalWebSocketStats) with a scoped defaultWebSocketStats instance to improve encapsulation and maintainability. (subscription.go: [1] [2] [3]
  • Moved WebSocket statistics implementation to a new file, subscription_metrics.go, and added functionality to manage a cache of closed connection IDs with a configurable size. (subscription_metrics.go: subscription_metrics.goR1-R122)
  • Introduced methods to reset WebSocket statistics and configure the maximum size of the closed connection cache. (subscription_metrics.go: subscription_metrics.goR1-R122)

Copy link

github-actions bot commented May 14, 2025

Code Coverage

Package Line Rate Health
github.com/hasura/go-graphql-client 67%
github.com/hasura/go-graphql-client/ident 100%
github.com/hasura/go-graphql-client/pkg/jsonutil 84%
Summary 71% (1847 / 2618)

Minimum allowed line rate is 60%

@hgiasac hgiasac merged commit ac25fae into master May 14, 2025
2 checks passed
@hgiasac hgiasac deleted the improve-subscription-metrics branch May 14, 2025 04:03
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