mirror of
https://github.com/coder/coder.git
synced 2026-06-03 04:58:23 +00:00
5b7377c375
Add Prometheus metrics to the boundary log proxy for observability: - batches_dropped_total (reason: buffer_full, forward_failed) - logs_dropped_total (reason: buffer_full, forward_failed, boundary_channel_full, boundary_batch_full) - batches_forwarded_total Also add BoundaryStatus to the BoundaryMessage envelope so boundary can report dropped log counts as a separate wire message. The agent records these as Prometheus metrics, making boundary-side data loss visible. Backwards compatibility for older versions of boundary is maintained. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
30 lines
1.0 KiB
Protocol Buffer
30 lines
1.0 KiB
Protocol Buffer
syntax = "proto3";
|
|
option go_package = "github.com/coder/coder/v2/agent/boundarylogproxy/codec";
|
|
|
|
package coder.boundarylogproxy.codec.v1;
|
|
|
|
import "agent/proto/agent.proto";
|
|
|
|
// BoundaryMessage is the envelope for all TagV2 messages sent over the
|
|
// boundary <-> agent unix socket. TagV1 carries a bare
|
|
// ReportBoundaryLogsRequest for backwards compatibility; TagV2 wraps
|
|
// everything in this envelope so the protocol can be extended with new
|
|
// message types without adding more tags.
|
|
message BoundaryMessage {
|
|
oneof msg {
|
|
coder.agent.v2.ReportBoundaryLogsRequest logs = 1;
|
|
BoundaryStatus status = 2;
|
|
}
|
|
}
|
|
|
|
// BoundaryStatus carries operational metadata from boundary to the agent.
|
|
// The agent records these values as Prometheus metrics. This message is
|
|
// never forwarded to coderd.
|
|
message BoundaryStatus {
|
|
// Logs dropped because boundary's internal channel buffer was full.
|
|
int64 dropped_channel_full = 1;
|
|
// Logs dropped because boundary's batch buffer was full after a
|
|
// failed flush attempt.
|
|
int64 dropped_batch_full = 2;
|
|
}
|