Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ServiceName is a trace attribute for the service name ServiceName = attribute.Key("service.name") //EmptyParentSpanDescriptor is a descritor for an empty span EmptyParentSpanDescriptor = ParentSpanDescriptor{} )
View Source
var ( //ClientName is a trace attribute for the service name ClientName = attribute.Key("client.name") )
Functions ¶
Types ¶
type ClientTraceOption ¶
type ClientTraceOption func(*ClientTraceOptions)
ClientTraceOption
func WithClientTracer ¶
func WithClientTracer(tr trace.Tracer) ClientTraceOption
WithClientTracer sets a specific tracer to be uses
type ClientTraceOptions ¶
type ClientTraceOptions struct {
// contains filtered or unexported fields
}
ClientTraceOptions
type ClientTracer ¶
type ClientTracer interface {
Inject(ctx context.Context, r *http.Request) (context.Context, *http.Request)
StartSpan(ctx context.Context, spanName string, attrs []attribute.KeyValue, opts ...trace.SpanOption) (context.Context, trace.Span)
EndSpan(span trace.Span)
}
ClientTracer allows tracing of blaze services
func NewClientTracer ¶
func NewClientTracer(opts ...ClientTraceOption) ClientTracer
NewClientTracer creates a new tracer
type ParentSpanDescriptor ¶
type ParentSpanDescriptor struct {
// contains filtered or unexported fields
}
ParentSpanDescriptor dexcribes the parent span
type ServiceTraceOption ¶
type ServiceTraceOption func(*ServiceTraceOptions)
ServiceTraceOption
func WithTracer ¶
func WithTracer(tr trace.Tracer) ServiceTraceOption
WithTracer sets a specific tracer to be uses
type ServiceTraceOptions ¶
type ServiceTraceOptions struct {
// contains filtered or unexported fields
}
ServiceTraceOptions
type ServiceTracer ¶
type ServiceTracer interface {
Extract(r *http.Request) (context.Context, *http.Request, ParentSpanDescriptor)
StartSpan(ctx context.Context, spanName string, psd ParentSpanDescriptor, attrs []attribute.KeyValue, opts ...trace.SpanOption) (context.Context, trace.Span)
EndSpan(span trace.Span)
}
ServiceTracer allows tracing of blaze services
func NewServiceTracer ¶
func NewServiceTracer(opts ...ServiceTraceOption) ServiceTracer
NewServiceTracer
Click to show internal directories.
Click to hide internal directories.