Documentation ¶
Index ¶
- func Extract(carrier *KafkaHeadersCarrier) (opentracing.SpanContext, error)
- func InitProductionZipkin(serviceName, zipkinHost string, zipkinPort int) (reporter.Reporter, error)
- func InitSampleZipkin(serviceName, zipkinHost string, zipkinPort int) (reporter.Reporter, error)
- func InitTestingZipkin(serviceName, zipkinHost string, zipkinPort int) (reporter.Reporter, error)
- func InitTracer() (io.Closer, error)
- func Inject(span opentracing.Span, carrier *KafkaHeadersCarrier) error
- func SampleManualInitTracer(serviceName string) (io.Closer, error)
- type KafkaHeadersCarrier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Extract ¶
func Extract(carrier *KafkaHeadersCarrier) (opentracing.SpanContext, error)
Extract extracts the span context out of Kafka headers.
func InitProductionZipkin ¶
func InitSampleZipkin ¶
func InitTestingZipkin ¶
func InitTracer ¶
Use Zap logger to print out spans. Use a Prometheus registerer to expose metrics.
func Inject ¶
func Inject(span opentracing.Span, carrier *KafkaHeadersCarrier) error
Inject injects the span context into Kafka headers.
Types ¶
type KafkaHeadersCarrier ¶
KafkaHeadersCarrier satisfies both TextMapWriter and TextMapReader. See Inject(..) method as example usage on producer side. See Extract(..) method as example usage on consumer side.
func (*KafkaHeadersCarrier) ForeachKey ¶
func (c *KafkaHeadersCarrier) ForeachKey(handler func(key, val string) error) error
ForeachKey implements ForeachKey(..) of opentracing.TextMapReader interface.
func (*KafkaHeadersCarrier) Set ¶
func (c *KafkaHeadersCarrier) Set(key, val string)
Set implements Set() of opentracing.TextMapWriter interface.
Click to show internal directories.
Click to hide internal directories.