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:
Spike Curtis
2024-02-23 11:27:15 +04:00
committed by GitHub
parent af3fdc68c3
commit 4cc132cea0
6 changed files with 203 additions and 63 deletions
+2
View File
@@ -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 {