@@ -22,7 +22,6 @@ defmodule Realtime.PromEx.Plugins.Tenant do
2222 [
2323 channel_events ( ) ,
2424 replication_metrics ( ) ,
25- subscription_metrics ( ) ,
2625 payload_size_metrics ( )
2726 ]
2827 end
@@ -78,21 +77,14 @@ defmodule Realtime.PromEx.Plugins.Tenant do
7877 description: "The cluster total count of connected clients for a tenant." ,
7978 measurement: :connected_cluster ,
8079 tags: [ :tenant ]
81- ) ,
82- last_value (
83- [ :realtime , :connections , :limit_concurrent ] ,
84- event_name: [ :realtime , :connections ] ,
85- description: "The total count of connected clients for a tenant." ,
86- measurement: :limit ,
87- tags: [ :tenant ]
8880 )
8981 ] ,
9082 detach_on_error: false
9183 )
9284 end
9385
9486 def execute_tenant_metrics do
95- tenants = Tenants.Connect . list_tenants ( )
87+ tenants = Tenants . list_connected_tenants ( Node . self ( ) )
9688 cluster_counts = UsersCounter . tenant_counts ( )
9789 node_counts = UsersCounter . tenant_counts ( Node . self ( ) )
9890
@@ -136,28 +128,6 @@ defmodule Realtime.PromEx.Plugins.Tenant do
136128 )
137129 end
138130
139- defp subscription_metrics do
140- Event . build (
141- :realtime_tenant_channel_event_metrics ,
142- [
143- sum (
144- [ :realtime , :subscriptions_checker , :pid_not_found ] ,
145- event_name: [ :realtime , :subscriptions_checker , :pid_not_found ] ,
146- measurement: :sum ,
147- description: "Sum of pids not found in Subscription tables." ,
148- tags: [ :tenant ]
149- ) ,
150- sum (
151- [ :realtime , :subscriptions_checker , :phantom_pid_detected ] ,
152- event_name: [ :realtime , :subscriptions_checker , :phantom_pid_detected ] ,
153- measurement: :sum ,
154- description: "Sum of phantom pids detected in Subscription tables." ,
155- tags: [ :tenant ]
156- )
157- ]
158- )
159- end
160-
161131 defmodule PolicyAuthorization.Buckets do
162132 @ moduledoc false
163133 use Peep.Buckets.Custom , buckets: [ 10 , 250 , 5000 , 15_000 ]
@@ -237,20 +207,6 @@ defmodule Realtime.PromEx.Plugins.Tenant do
237207 measurement: :size ,
238208 tags: [ :tenant ]
239209 ) ,
240- last_value (
241- [ :realtime , :channel , :events , :limit_per_second ] ,
242- event_name: [ :realtime , :rate_counter , :channel , :events ] ,
243- measurement: :limit ,
244- description: "Rate limit of messages per second sent on a Realtime Channel." ,
245- tags: [ :tenant ]
246- ) ,
247- last_value (
248- [ :realtime , :channel , :joins , :limit_per_second ] ,
249- event_name: [ :realtime , :rate_counter , :channel , :joins ] ,
250- measurement: :limit ,
251- description: "Rate limit of joins per second on a Realtime Channel." ,
252- tags: [ :tenant ]
253- ) ,
254210 distribution (
255211 [ :realtime , :tenants , :read_authorization_check ] ,
256212 event_name: [ :realtime , :tenants , :read_authorization_check ] ,
0 commit comments