github.com/blend/go-sdk@v1.20240719.1/webutil/tracer.go (about) 1 /* 2 3 Copyright (c) 2024 - Present. Blend Labs, Inc. All rights reserved 4 Use of this source code is governed by a MIT license that can be found in the LICENSE file. 5 6 */ 7 8 package webutil 9 10 import ( 11 "net/http" 12 ) 13 14 // HTTPTracer is a simplified version of `Tracer` intended for a raw 15 // `(net/http).Request`. It returns a "new" request the request context may 16 // be modified after opening a span. 17 type HTTPTracer interface { 18 Start(*http.Request) (HTTPTraceFinisher, *http.Request) 19 } 20 21 // HTTPTraceFinisher is a simplified version of `TraceFinisher`. 22 type HTTPTraceFinisher interface { 23 Finish(int, error) 24 }