MCPcopy Index your code
hub / github.com/coder/coder / bufferLogs

Method bufferLogs

agent/boundarylogproxy/proxy.go:213–222  ·  view source on GitHub ↗
(ctx context.Context, req *agentproto.ReportBoundaryLogsRequest)

Source from the content-addressed store, hash-verified

211}
212
213func (s *Server) bufferLogs(ctx context.Context, req *agentproto.ReportBoundaryLogsRequest) {
214 select {
215 case s.logs <- req:
216 default:
217 s.logger.Warn(ctx, "dropping boundary logs, buffer full",
218 slog.F("log_count", len(req.Logs)))
219 s.metrics.batchesDropped.WithLabelValues(droppedReasonBufferFull).Inc()
220 s.metrics.logsDropped.WithLabelValues(droppedReasonBufferFull).Add(float64(len(req.Logs)))
221 }
222}
223
224// Close stops the server and blocks until resources have been cleaned up.
225// It must be called after Start.

Callers 1

handleMessageMethod · 0.95

Calls 2

WithLabelValuesMethod · 0.80
AddMethod · 0.65

Tested by

no test coverage detected