newStream traces svc.NewStreaming() call.
(ctx context.Context, svc anthropic.MessageService, extraOpts ...option.RequestOption)
| 683 | |
| 684 | // newStream traces svc.NewStreaming() call. |
| 685 | func (i *StreamingInterception) newStream(ctx context.Context, svc anthropic.MessageService, extraOpts ...option.RequestOption) *ssestream.Stream[anthropic.MessageStreamEventUnion] { |
| 686 | _, span := i.tracer.Start(ctx, "Intercept.ProcessRequest.Upstream", trace.WithAttributes(tracing.InterceptionAttributesFromContext(ctx)...)) |
| 687 | defer span.End() |
| 688 | |
| 689 | opts := append([]option.RequestOption{i.withBody()}, extraOpts...) |
| 690 | return svc.NewStreaming(ctx, anthropic.MessageNewParams{}, opts...) |
| 691 | } |
no test coverage detected