feat: Implement aggregator for agent metrics (#7259)

This commit is contained in:
Marcin Tojek
2023-04-27 12:34:00 +02:00
committed by GitHub
parent b6666cf1cf
commit bb0a38b161
12 changed files with 714 additions and 74 deletions

View File

@@ -16,6 +16,46 @@
| `document` | string | true | | |
| `signature` | string | true | | |
## agentsdk.AgentMetric
```json
{
"name": "string",
"type": "counter",
"value": 0
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
| ------- | ---------------------------------------------------- | -------- | ------------ | ----------- |
| `name` | string | true | | |
| `type` | [agentsdk.AgentMetricType](#agentsdkagentmetrictype) | true | | |
| `value` | number | true | | |
#### Enumerated Values
| Property | Value |
| -------- | --------- |
| `type` | `counter` |
| `type` | `gauge` |
## agentsdk.AgentMetricType
```json
"counter"
```
### Properties
#### Enumerated Values
| Value |
| --------- |
| `counter` |
| `gauge` |
## agentsdk.AuthenticateResponse
```json
@@ -326,6 +366,13 @@
"property1": 0,
"property2": 0
},
"metrics": [
{
"name": "string",
"type": "counter",
"value": 0
}
],
"rx_bytes": 0,
"rx_packets": 0,
"session_count_jetbrains": 0,
@@ -339,20 +386,21 @@
### Properties
| 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. |
| 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 | | |
| `metrics` | array of [agentsdk.AgentMetric](#agentsdkagentmetric) | false | | Metrics collected by the 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. |
| `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