MCPcopy Create free account
hub / github.com/coder/aibridge / baseTraceAttributes

Method baseTraceAttributes

intercept/responses/base.go:106–115  ·  view source on GitHub ↗
(r *http.Request, streaming bool)

Source from the content-addressed store, hash-verified

104}
105
106func (i *responsesInterceptionBase) baseTraceAttributes(r *http.Request, streaming bool) []attribute.KeyValue {
107 return []attribute.KeyValue{
108 attribute.String(tracing.RequestPath, r.URL.Path),
109 attribute.String(tracing.InterceptionID, i.id.String()),
110 attribute.String(tracing.InitiatorID, aibcontext.ActorIDFromContext(r.Context())),
111 attribute.String(tracing.Provider, i.providerName),
112 attribute.String(tracing.Model, i.Model()),
113 attribute.Bool(tracing.Streaming, streaming),
114 }
115}
116
117func (i *responsesInterceptionBase) validateRequest(ctx context.Context, w http.ResponseWriter) error {
118 if i.reqPayload.background() {

Callers 2

TraceAttributesMethod · 0.45
TraceAttributesMethod · 0.45

Calls 1

ModelMethod · 0.95

Tested by

no test coverage detected