Source File
client.go
Belonging Package
go.opencensus.io/plugin/ochttp
package ochttp
import (
)
GetStartOptions func(*http.Request) trace.StartOptions
FormatSpanName func(*http.Request) string
NewClientTrace func(*http.Request, *trace.Span) *httptrace.ClientTrace
}
:= .Propagation
if == nil {
= defaultFormat
}
:= .FormatSpanName
if == nil {
= spanNameFromURL
}
:= .StartOptions
if .GetStartOptions != nil {
= .GetStartOptions()
}
= &traceTransport{
base: ,
format: ,
startOptions: trace.StartOptions{
Sampler: .Sampler,
SpanKind: trace.SpanKindClient,
},
formatSpanName: ,
newClientTrace: .NewClientTrace,
}
= statsTransport{base: }
return .RoundTrip()
}
func ( *Transport) () http.RoundTripper {
if .Base != nil {
return .Base
}
return http.DefaultTransport
}
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |