MCPcopy Create free account
hub / github.com/Noumena-Network/code / createSpanAttributes

Function createSpanAttributes

src/utils/telemetry/sessionTracing.ts:157–170  ·  view source on GitHub ↗
(
  spanType: SpanType,
  customAttributes: Record<string, string | number | boolean> = {},
)

Source from the content-addressed store, hash-verified

155}
156
157function createSpanAttributes(
158 spanType: SpanType,
159 customAttributes: Record<string, string | number | boolean> = {},
160): Record<string, string | number | boolean> {
161 const baseAttributes = getTelemetryAttributes()
162
163 const attributes: Record<string, string | number | boolean> = {
164 ...baseAttributes,
165 'span.type': spanType,
166 ...customAttributes,
167 }
168
169 return attributes
170}
171
172/**
173 * Start an interaction span. This wraps a user request -> NCode response cycle.

Callers 7

startInteractionSpanFunction · 0.85
startLLMRequestSpanFunction · 0.85
startToolSpanFunction · 0.85
startToolExecutionSpanFunction · 0.85
executeInSpanFunction · 0.85
startHookSpanFunction · 0.85

Calls 1

getTelemetryAttributesFunction · 0.85

Tested by

no test coverage detected