MCPcopy
hub / github.com/kagent-dev/kagent / contextAttributes

Function contextAttributes

go/adk/pkg/telemetry/attributes.go:49–55  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

47}
48
49func contextAttributes(ctx context.Context) map[string]string {
50 attrs, _ := ctx.Value(kagentSpanAttributesKey{}).(map[string]string)
51 if len(attrs) == 0 {
52 return nil
53 }
54 return attrs
55}
56
57func mergeAttributes(existing, updates map[string]string) map[string]string {
58 if len(existing) == 0 && len(updates) == 0 {

Callers 2

SetKAgentSpanAttributesFunction · 0.85
OnStartMethod · 0.85

Calls 1

ValueMethod · 0.45

Tested by

no test coverage detected