MCPcopy
hub / github.com/docker/docker-agent / SetAttributes

Method SetAttributes

pkg/telemetry/mcp/span.go:164–169  ·  view source on GitHub ↗

SetAttributes adds extra attributes to the span. Use for MCP extensions or for response-side attributes the caller learns later (e.g. rpc.response.status_code).

(attrs ...attribute.KeyValue)

Source from the content-addressed store, hash-verified

162// or for response-side attributes the caller learns later
163// (e.g. rpc.response.status_code).
164func (s *Span) SetAttributes(attrs ...attribute.KeyValue) {
165 if s == nil {
166 return
167 }
168 s.span.SetAttributes(attrs...)
169}
170
171// RecordError marks the span as failed and stores error.type for the
172// duration metric. errType should be a short, low-cardinality string;

Callers 15

runJavascriptMethod · 0.45
refreshStoredTokenMethod · 0.45
ListToolsMethod · 0.45
StartMethod · 0.45
CallToolMethod · 0.45
lspToolFunction · 0.45
RunShellMethod · 0.45
executeMethod · 0.45
handleSearchToolMethod · 0.45
handleAddToolMethod · 0.45
userPromptMethod · 0.45
annotateTodoSpanFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected