(ctx context.Context, req *agentproto.ReportBoundaryLogsRequest)
| 211 | } |
| 212 | |
| 213 | func (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. |
no test coverage detected