Documentation ¶
Index ¶
- func BuildJaegerThrift(span *Span) *j.Span
- func Init()
- type Config
- type HTTPBasicAuthCredentials
- type HTTPOption
- type HTTPTransport
- type JaegerReporter
- type Reference
- type Span
- func (s *Span) BaggageItem(key string) string
- func (s *Span) Context() opentracing.SpanContext
- func (s *Span) Duration() time.Duration
- func (s *Span) Finish()
- func (s *Span) FinishWithOptions(options opentracing.FinishOptions)
- func (s *Span) Log(ld opentracing.LogData)
- func (s *Span) LogEvent(event string)
- func (s *Span) LogEventWithPayload(event string, payload interface{})
- func (s *Span) LogFields(fields ...log.Field)
- func (s *Span) LogKV(alternatingKeyValues ...interface{})
- func (s *Span) Logs() []opentracing.LogRecord
- func (s *Span) OperationName() string
- func (s *Span) References() []opentracing.SpanReference
- func (s *Span) Release()
- func (s *Span) Retain() *Span
- func (s *Span) ServiceName() string
- func (s *Span) SetBaggageItem(key, value string) opentracing.Span
- func (s *Span) SetOperationName(operationName string) opentracing.Span
- func (s *Span) SetTag(key string, value interface{}) opentracing.Span
- func (s *Span) SpanContext() SpanContext
- func (s *Span) StartTime() time.Time
- func (s *Span) String() string
- func (s *Span) Tags() opentracing.Tags
- func (s *Span) Tracer() opentracing.Tracer
- type SpanContext
- func (c *SpanContext) CopyFrom(ctx *SpanContext)
- func (c SpanContext) ExtendedSamplingState(key interface{}, initValue func() interface{}) interface{}
- func (c SpanContext) Flags() byte
- func (c SpanContext) ForeachBaggageItem(handler func(k, v string) bool)
- func (c SpanContext) IsDebug() bool
- func (c SpanContext) IsFirehose() bool
- func (c SpanContext) IsSampled() bool
- func (c SpanContext) IsSamplingFinalized() bool
- func (c SpanContext) IsValid() bool
- func (c SpanContext) ParentID() SpanID
- func (c SpanContext) SetFirehose()
- func (c SpanContext) SpanID() SpanID
- func (c SpanContext) String() string
- func (c SpanContext) TraceID() TraceID
- func (c SpanContext) WithBaggageItem(key, value string) SpanContext
- type SpanID
- type Tag
- type TraceID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildJaegerThrift ¶
Types ¶
type HTTPBasicAuthCredentials ¶
type HTTPBasicAuthCredentials struct {
// contains filtered or unexported fields
}
HTTPBasicAuthCredentials stores credentials for HTTP basic auth.
type HTTPOption ¶
type HTTPOption func(c *HTTPTransport)
HTTPOption sets a parameter for the HttpCollector
func HTTPBasicAuth ¶
func HTTPBasicAuth(username string, password string) HTTPOption
HTTPBasicAuth sets the credentials required to perform HTTP basic auth
func HTTPBatchSize ¶
func HTTPBatchSize(n int) HTTPOption
HTTPBatchSize sets the maximum batch size, after which a collect will be triggered. The default batch size is 100 spans.
func HTTPHeaders ¶
func HTTPHeaders(headers map[string]string) HTTPOption
HTTPHeaders defines the HTTP headers that will be attached to the jaeger client's HTTP request
func HTTPRoundTripper ¶
func HTTPRoundTripper(transport http.RoundTripper) HTTPOption
HTTPRoundTripper configures the underlying Transport on the *http.Client that is used
func HTTPTimeout ¶
func HTTPTimeout(duration time.Duration) HTTPOption
HTTPTimeout sets maximum timeout for http request.
type HTTPTransport ¶
type HTTPTransport struct {
// contains filtered or unexported fields
}
HTTPTransport implements Transport by forwarding spans to a http server.
func NewHTTPTransport ¶
func NewHTTPTransport(url string, options ...HTTPOption) *HTTPTransport
NewHTTPTransport returns a new HTTP-backend transport. url should be an http url of the collector to handle POST request, typically something like:
http://hostname:14268/api/traces?format=jaeger.thrift
func (*HTTPTransport) Append ¶
func (c *HTTPTransport) Append(span *Span) (int, error)
Append implements Transport.
func (*HTTPTransport) Flush ¶
func (c *HTTPTransport) Flush() (int, error)
Flush implements Transport.
type JaegerReporter ¶
type JaegerReporter struct {
// contains filtered or unexported fields
}
func (*JaegerReporter) Close ¶
func (rpt *JaegerReporter) Close() error
type Reference ¶
type Reference struct { Type opentracing.SpanReferenceType Context SpanContext }
Reference represents a causal reference to other Spans (via their SpanContext).
type Span ¶
Span implements opentracing.Span
func (*Span) BaggageItem ¶
BaggageItem implements BaggageItem() of opentracing.SpanContext
func (*Span) Context ¶
func (s *Span) Context() opentracing.SpanContext
Context implements opentracing.Span API
func (*Span) Finish ¶
func (s *Span) Finish()
Finish implements opentracing.Span API After finishing the Span object it returns back to the allocator unless the reporter retains it again, so after that, the Span object should no longer be used because it won't be valid anymore.
func (*Span) FinishWithOptions ¶
func (s *Span) FinishWithOptions(options opentracing.FinishOptions)
FinishWithOptions implements opentracing.Span API
func (*Span) LogEventWithPayload ¶
LogEventWithPayload implements opentracing.Span API
func (*Span) LogKV ¶
func (s *Span) LogKV(alternatingKeyValues ...interface{})
LogKV implements opentracing.Span API
func (*Span) OperationName ¶
OperationName allows retrieving current operation name.
func (*Span) References ¶
func (s *Span) References() []opentracing.SpanReference
References returns references for this span
func (*Span) Release ¶
func (s *Span) Release()
Release decrements object counter and return to the allocator manager when counter will below zero
func (*Span) ServiceName ¶
func (*Span) SetBaggageItem ¶
SetBaggageItem implements SetBaggageItem() of opentracing.SpanContext
func (*Span) SetOperationName ¶
SetOperationName sets or changes the operation name.
func (*Span) SpanContext ¶
func (s *Span) SpanContext() SpanContext
SpanContext returns span context
type SpanContext ¶
type SpanContext struct {
// contains filtered or unexported fields
}
SpanContext represents propagated span identity and state
func ContextFromString ¶
func ContextFromString(value string) (SpanContext, error)
ContextFromString reconstructs the Context encoded in a string
func NewSpanContext ¶
func NewSpanContext(traceID TraceID, spanID, parentID SpanID, sampled bool, baggage map[string]string) SpanContext
NewSpanContext creates a new instance of SpanContext
func (*SpanContext) CopyFrom ¶
func (c *SpanContext) CopyFrom(ctx *SpanContext)
CopyFrom copies data from ctx into this context, including span identity and baggage. TODO This is only used by interop.go. Remove once TChannel Go supports OpenTracing.
func (SpanContext) ExtendedSamplingState ¶
func (c SpanContext) ExtendedSamplingState(key interface{}, initValue func() interface{}) interface{}
ExtendedSamplingState returns the custom state object for a given key. If the value for this key does not exist, it is initialized via initValue function. This state can be used by samplers (e.g. x.PrioritySampler).
func (SpanContext) Flags ¶
func (c SpanContext) Flags() byte
Flags returns the bitmap containing such bits as 'sampled' and 'debug'.
func (SpanContext) ForeachBaggageItem ¶
func (c SpanContext) ForeachBaggageItem(handler func(k, v string) bool)
ForeachBaggageItem implements ForeachBaggageItem() of opentracing.SpanContext
func (SpanContext) IsDebug ¶
func (c SpanContext) IsDebug() bool
IsDebug indicates whether sampling was explicitly requested by the service.
func (SpanContext) IsFirehose ¶
func (c SpanContext) IsFirehose() bool
IsFirehose indicates whether the firehose flag was set
func (SpanContext) IsSampled ¶
func (c SpanContext) IsSampled() bool
IsSampled returns whether this trace was chosen for permanent storage by the sampling mechanism of the tracer.
func (SpanContext) IsSamplingFinalized ¶
func (c SpanContext) IsSamplingFinalized() bool
IsSamplingFinalized indicates whether the sampling decision has been finalized.
func (SpanContext) IsValid ¶
func (c SpanContext) IsValid() bool
IsValid indicates whether this context actually represents a valid trace.
func (SpanContext) ParentID ¶
func (c SpanContext) ParentID() SpanID
ParentID returns the parent span ID of this span context
func (SpanContext) SetFirehose ¶
func (c SpanContext) SetFirehose()
SetFirehose enables firehose mode for this trace.
func (SpanContext) SpanID ¶
func (c SpanContext) SpanID() SpanID
SpanID returns the span ID of this span context
func (SpanContext) String ¶
func (c SpanContext) String() string
func (SpanContext) TraceID ¶
func (c SpanContext) TraceID() TraceID
TraceID returns the trace ID of this span context
func (SpanContext) WithBaggageItem ¶
func (c SpanContext) WithBaggageItem(key, value string) SpanContext
WithBaggageItem creates a new context with an extra baggage item.
type SpanID ¶
type SpanID uint64
SpanID represents unique 64bit identifier of a span
func SpanIDFromString ¶
SpanIDFromString creates a SpanID from a hexadecimal string
type Tag ¶
type Tag struct {
// contains filtered or unexported fields
}
Tag is a simple key value wrapper. TODO (breaking change) deprecate in the next major release, use opentracing.Tag instead.