mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add agent stats for different connection types (#6412)
This allows us to track when our extensions are used, when the web terminal is used, and average connection latency to the agent.
This commit is contained in:
+7
-2
@@ -401,13 +401,18 @@ curl -X POST http://coder-server:8080/api/v2/workspaceagents/me/report-stats \
|
||||
|
||||
```json
|
||||
{
|
||||
"conns_by_proto": {
|
||||
"connection_count": 0,
|
||||
"connection_median_latency_ms": 0,
|
||||
"connections_by_proto": {
|
||||
"property1": 0,
|
||||
"property2": 0
|
||||
},
|
||||
"num_comms": 0,
|
||||
"rx_bytes": 0,
|
||||
"rx_packets": 0,
|
||||
"session_count_jetbrains": 0,
|
||||
"session_count_reconnecting_pty": 0,
|
||||
"session_count_ssh": 0,
|
||||
"session_count_vscode": 0,
|
||||
"tx_bytes": 0,
|
||||
"tx_packets": 0
|
||||
}
|
||||
|
||||
+21
-11
@@ -248,13 +248,18 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"conns_by_proto": {
|
||||
"connection_count": 0,
|
||||
"connection_median_latency_ms": 0,
|
||||
"connections_by_proto": {
|
||||
"property1": 0,
|
||||
"property2": 0
|
||||
},
|
||||
"num_comms": 0,
|
||||
"rx_bytes": 0,
|
||||
"rx_packets": 0,
|
||||
"session_count_jetbrains": 0,
|
||||
"session_count_reconnecting_pty": 0,
|
||||
"session_count_ssh": 0,
|
||||
"session_count_vscode": 0,
|
||||
"tx_bytes": 0,
|
||||
"tx_packets": 0
|
||||
}
|
||||
@@ -262,15 +267,20 @@
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------------ | ------- | -------- | ------------ | ------------------------------------------------------------ |
|
||||
| `conns_by_proto` | object | false | | Conns by proto is a count of connections by protocol. |
|
||||
| » `[any property]` | integer | false | | |
|
||||
| `num_comms` | integer | false | | Num comms is the number of connections received by an agent. |
|
||||
| `rx_bytes` | integer | false | | Rx bytes is the number of received bytes. |
|
||||
| `rx_packets` | integer | false | | Rx packets is the number of received packets. |
|
||||
| `tx_bytes` | integer | false | | Tx bytes is the number of transmitted bytes. |
|
||||
| `tx_packets` | integer | false | | Tx packets is the number of transmitted bytes. |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| -------------------------------- | ------- | -------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `connection_count` | integer | false | | Connection count is the number of connections received by an agent. |
|
||||
| `connection_median_latency_ms` | number | false | | Connection median latency ms is the median latency of all connections in milliseconds. |
|
||||
| `connections_by_proto` | object | false | | Connections by proto is a count of connections by protocol. |
|
||||
| » `[any property]` | integer | false | | |
|
||||
| `rx_bytes` | integer | false | | Rx bytes is the number of received bytes. |
|
||||
| `rx_packets` | integer | false | | Rx packets is the number of received packets. |
|
||||
| `session_count_jetbrains` | integer | false | | Session count jetbrains is the number of connections received by an agent that are from our JetBrains extension. |
|
||||
| `session_count_reconnecting_pty` | integer | false | | Session count reconnecting pty is the number of connections received by an agent that are from the reconnecting web terminal. |
|
||||
| `session_count_ssh` | integer | false | | Session count ssh is the number of connections received by an agent that are normal, non-tagged SSH sessions. |
|
||||
| `session_count_vscode` | integer | false | | Session count vscode is the number of connections received by an agent that are from our VS Code extension. |
|
||||
| `tx_bytes` | integer | false | | Tx bytes is the number of transmitted bytes. |
|
||||
| `tx_packets` | integer | false | | Tx packets is the number of transmitted bytes. |
|
||||
|
||||
## agentsdk.StatsResponse
|
||||
|
||||
|
||||
Reference in New Issue
Block a user