Skip to content

Commit 8133ab0

Browse files
committed
updating description of tcp_data_*/tls_data_* metrics
1 parent 667eb26 commit 8133ab0

File tree

2 files changed

+18
-31
lines changed

2 files changed

+18
-31
lines changed

doc/operation-and-maintenance/MongooseIM-metrics.md

+16-24
Original file line numberDiff line numberDiff line change
@@ -296,49 +296,41 @@ All metrics are in bytes, and refer to unencrypted data (before encryption or af
296296
| ----------- | ---- | ----------- |
297297
| `xmpp_element_size_in_byte_size` | histogram | Size of an XML element received from a client, server or component. |
298298
| `xmpp_element_size_out_byte_size` | histogram | Size of an XML element sent to a client, server or component. |
299-
| `c2s_tcp_data_in_byte_size` | counter | Amount of data received from a client via TCP channel. |
300-
| `c2s_tcp_data_out_byte_size` | counter | Amount of data sent to a client via TCP channel. |
301-
| `c2s_tls_data_in_byte_size` | counter | Amount of data received from a client via TLS channel. |
302-
| `c2s_tls_data_out_byte_size` | counter | Amount of data sent to a client via TLS channel. |
299+
| `tcp_data_in_byte_size` | counter | Amount of data received from a client, another XMPP server or component via TCP channel. |
300+
| `tcp_data_out_byte_size` | counter | Amount of data sent to a client, another XMPP server or component via TCP channel. |
301+
| `tls_data_in_byte_size` | counter | Amount of data received from a client, another XMPP server or component via TLS channel. |
302+
| `tls_data_out_byte_size` | counter | Amount of data sent to a client, another XMPP server or component via TLS channel. |
303303
| `mod_bosh_data_received_byte_size` | counter | Amount of data received from a client via BOSH connection. |
304304
| `mod_bosh_data_sent_byte_size` | counter | Amount of data sent to a client via BOSH connection. |
305305
| `mod_websocket_data_received_byte_size` | counter | Amount of data received from a client via WebSocket connection. |
306306
| `mod_websocket_data_sent_byte_size` | counter | Amount of data sent to a client via WebSocket connection. |
307-
| `s2s_tcp_data_in_byte_size` | counter | Amount of data received from another XMPP server via TCP channel. |
308-
| `s2s_tcp_data_out_byte_size` | counter | Amount of data sent to another XMPP server via TCP channel. |
309-
| `s2s_tls_data_in_byte_size` | counter | Amount of data received from another XMPP server via TLS channel. |
310-
| `s2s_tls_data_out_byte_size` | counter | Amount of data sent to another XMPP server via TLS channel. |
311-
| `component_tcp_data_in_byte_size` | counter | Amount of data received from a component via TCP channel. |
312-
| `component_tcp_data_out_byte_size` | counter | Amount of data sent to a component via TCP channel. |
313-
| `component_tls_data_in_byte_size` | counter | Amount of data received from a component via TLS channel. |
314-
| `component_tls_data_out_byte_size` | counter | Amount of data sent to a component via TLS channel. |
315307

316308
=== "Exometer"
317309

318310
| Metric name | Type | Description |
319311
| ----------- | ---- | ----------- |
320312
| `[global, xmpp_element_size_in, c2s, byte_size]` | histogram | Size of an XML element received from a client. |
321313
| `[global, xmpp_element_size_out, c2s, byte_size]` | histogram | Size of an XML element sent to a client. |
322-
| `[global, c2s_tcp_data_in, byte_size]` | spiral | Amount of data received from a client via TCP channel. |
323-
| `[global, c2s_tcp_data_out, byte_size]` | spiral | Amount of data sent to a client via TCP channel. |
324-
| `[global, c2s_tls_data_in, byte_size]` | spiral | Amount of data received from a client via TLS channel. |
325-
| `[global, c2s_tls_data_out, byte_size]` | spiral | Amount of data sent to a client via TLS channel. |
314+
| `[global, tcp_data_in, c2s, byte_size]` | spiral | Amount of data received from a client via TCP channel. |
315+
| `[global, tcp_data_out, c2s, byte_size]` | spiral | Amount of data sent to a client via TCP channel. |
316+
| `[global, tls_data_in, c2s, byte_size]` | spiral | Amount of data received from a client via TLS channel. |
317+
| `[global, tls_data_out, c2s, byte_size]` | spiral | Amount of data sent to a client via TLS channel. |
326318
| `[global, mod_bosh_data_received, byte_size]` | spiral | Amount of data received from a client via BOSH connection. |
327319
| `[global, mod_bosh_data_sent, byte_size]` | spiral | Amount of data sent to a client via BOSH connection. |
328320
| `[global, mod_websocket_data_received, byte_size]` | spiral | Amount of data received from a client via WebSocket connection. |
329321
| `[global, mod_websocket_data_sent, byte_size]` | spiral | Amount of data sent to a client via WebSocket connection. |
330322
| `[global, xmpp_element_size_in, s2s, byte_size]` | histogram | Size of an XML element received from another XMPP server. |
331323
| `[global, xmpp_element_size_out, s2s, byte_size]` | histogram | Size of an XML element sent to another XMPP server. |
332-
| `[global, s2s_tcp_data_in, byte_size]` | spiral | Amount of data received from another XMPP server via TCP channel. |
333-
| `[global, s2s_tcp_data_out, byte_size]` | spiral | Amount of data sent to another XMPP server via TCP channel. |
334-
| `[global, s2s_tls_data_in, byte_size]` | spiral | Amount of data received from another XMPP server via TLS channel. |
335-
| `[global, s2s_tls_data_out, byte_size]` | spiral | Amount of data sent to another XMPP server via TLS channel. |
324+
| `[global, tcp_data_in, s2s, byte_size]` | spiral | Amount of data received from another XMPP server via TCP channel. |
325+
| `[global, tcp_data_out, s2s, byte_size]` | spiral | Amount of data sent to another XMPP server via TCP channel. |
326+
| `[global, tls_data_in, s2s, byte_size]` | spiral | Amount of data received from another XMPP server via TLS channel. |
327+
| `[global, tls_data_out, s2s, byte_size]` | spiral | Amount of data sent to another XMPP server via TLS channel. |
336328
| `[global, xmpp_element_size_in, component, byte_size]` | histogram | Size of an XML element received from a component. |
337329
| `[global, xmpp_element_size_out, component, byte_size]` | histogram | Size of an XML element sent to a component. |
338-
| `[global, component_tcp_data_in, byte_size]` | spiral | Amount of data received from a component via TCP channel. |
339-
| `[global, component_tcp_data_out, byte_size]` | spiral | Amount of data sent to a component via TCP channel. |
340-
| `[global, component_tls_data_in, byte_size]` | spiral | Amount of data received from a component via TLS channel. |
341-
| `[global, component_tls_data_out, byte_size]` | spiral | Amount of data sent to a component via TLS channel. |
330+
| `[global, tcp_data_in, component, byte_size]` | spiral | Amount of data received from a component via TCP channel. |
331+
| `[global, tcp_data_out, component, byte_size]` | spiral | Amount of data sent to a component via TCP channel. |
332+
| `[global, tls_data_in, component, byte_size]` | spiral | Amount of data received from a component via TLS channel. |
333+
| `[global, tls_data_out, component, byte_size]` | spiral | Amount of data sent to a component via TLS channel. |
342334

343335
### CETS system metrics
344336

src/ejabberd_cowboy.erl

+2-7
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,8 @@
5252

5353
-spec instrumentation(mongoose_listener:options()) -> [mongoose_instrument:spec()].
5454
instrumentation(#{handlers := Handlers}) ->
55-
PerModule = [Spec || #{module := Module} <- Handlers,
56-
Spec <- mongoose_http_handler:instrumentation(Module)],
57-
[{tcp_data_in, #{connection_type => http}, #{metrics => #{byte_size => spiral}}},
58-
{tcp_data_out, #{connection_type => http}, #{metrics => #{byte_size => spiral}}},
59-
{tls_data_in, #{connection_type => http}, #{metrics => #{byte_size => spiral}}},
60-
{tls_data_out, #{connection_type => http}, #{metrics => #{byte_size => spiral}}}
61-
| PerModule].
55+
[Spec || #{module := Module} <- Handlers,
56+
Spec <- mongoose_http_handler:instrumentation(Module)].
6257

6358
-spec listener_spec(mongoose_listener:options()) -> supervisor:child_spec().
6459
listener_spec(Opts) ->

0 commit comments

Comments
 (0)