MCPcopy
hub / github.com/grafana/dskit / SetError

Method SetError

spanlogger/spanlogger.go:241–248  ·  view source on GitHub ↗

SetError will set the error flag on the span.

()

Source from the content-addressed store, hash-verified

239
240// SetError will set the error flag on the span.
241func (s *SpanLogger) SetError() {
242 if s.otelSpan != nil {
243 s.otelSpan.SetStatus(codes.Error, "error")
244 return
245 }
246
247 ext.Error.Set(s.opentracingSpan, true)
248}
249
250// SetTag will set a tag/attribute on the span.
251func (s *SpanLogger) SetTag(key string, value interface{}) {

Callers 2

ErrorMethod · 0.95

Calls 1

SetMethod · 0.65

Tested by 1