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

Method RecordToolError

coderd/x/chatd/chatloop/metrics.go:161–166  ·  view source on GitHub ↗

RecordToolError increments tool_errors_total for the given tool. No-op when m is nil.

(provider, model, toolLabel string)

Source from the content-addressed store, hash-verified

159// RecordToolError increments tool_errors_total for the given
160// tool. No-op when m is nil.
161func (m *Metrics) RecordToolError(provider, model, toolLabel string) {
162 if m == nil {
163 return
164 }
165 m.ToolErrorsTotal.WithLabelValues(provider, model, toolLabel).Inc()
166}
167
168// RecordStreamBufferDropped increments stream_buffer_dropped_total
169// once per dropped event. No-op when m is nil.

Callers 4

TestRecordToolErrorFunction · 0.95
recordToolResultMetricsFunction · 0.80
executeSingleToolFunction · 0.80

Calls 1

WithLabelValuesMethod · 0.80

Tested by 2

TestRecordToolErrorFunction · 0.76