feat(coderd): add support for sending batched agent metadata (#10223)

Part of #9782
This commit is contained in:
Mathias Fredriksson
2023-10-13 16:37:55 +03:00
committed by GitHub
parent 1b1ab97c24
commit 7eeba15d16
18 changed files with 472 additions and 146 deletions

44
docs/api/schemas.md generated
View File

@ -317,6 +317,28 @@
| `scripts` | array of [codersdk.WorkspaceAgentScript](#codersdkworkspaceagentscript) | false | | |
| `vscode_port_proxy_uri` | string | false | | |
## agentsdk.Metadata
```json
{
"age": 0,
"collected_at": "2019-08-24T14:15:22Z",
"error": "string",
"key": "string",
"value": "string"
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
| -------------- | ------- | -------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
| `age` | integer | false | | Age is the number of seconds since the metadata was collected. It is provided in addition to CollectedAt to protect against clock skew. |
| `collected_at` | string | false | | |
| `error` | string | false | | |
| `key` | string | false | | |
| `value` | string | false | | |
## agentsdk.PatchLogs
```json
@ -375,6 +397,28 @@
## agentsdk.PostMetadataRequest
```json
{
"metadata": [
{
"age": 0,
"collected_at": "2019-08-24T14:15:22Z",
"error": "string",
"key": "string",
"value": "string"
}
]
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
| ---------- | ----------------------------------------------- | -------- | ------------ | ----------- |
| `metadata` | array of [agentsdk.Metadata](#agentsdkmetadata) | false | | |
## agentsdk.PostMetadataRequestDeprecated
```json
{
"age": 0,