mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: switch agent to use v2 API for sending logs (#12068)
Changes the agent to use the new v2 API for sending logs, via the logSender component. We keep the PatchLogs function around, but deprecate it so that we can test the v1 endpoint.
This commit is contained in:
@@ -517,6 +517,8 @@ type PatchLogs struct {
|
||||
|
||||
// PatchLogs writes log messages to the agent startup script.
|
||||
// Log messages are limited to 1MB in total.
|
||||
//
|
||||
// Deprecated: use the DRPCAgentClient.BatchCreateLogs instead
|
||||
func (c *Client) PatchLogs(ctx context.Context, req PatchLogs) error {
|
||||
res, err := c.SDK.Request(ctx, http.MethodPatch, "/api/v2/workspaceagents/me/logs", req)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user