package
module
Version:
v0.0.0-...-44aad02
Opens a new window with list of versions in this module.
Published: Mar 25, 2020
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Protobuf Span for Jaeger
Example
package main
import (
ot "github.com/opentracing/opentracing-go"
jcc "github.com/uber/jaeger-client-go/config"
"github.com/zevst/protobuf_span"
)
func main() {
cfg := jcc.Configuration{
// ...
}
propagator := protobuf_span.NewPropagator() // You can add BaggagePrefix as an option.
// Create Jaeger tracer from Configuration
// be sure to handle the error
tracer, closer, _ := cfg.NewTracer(
jcc.Injector(protobuf_span.Format, propagator),
jcc.Extractor(protobuf_span.Format, propagator),
)
ot.SetGlobalTracer(tracer)
defer func() {
// be sure to handle the error
_ = closer.Close()
}()
// continue main()
}
Documentation
¶
ProtoBufSpanFormat is an OpenTracing carrier format constant
func NewPropagator(opts ...Option) *propagator
type Option func(p *propagator)
Option sets an option on Propagator
BaggagePrefix sets baggage prefix on Propagator
Source Files
¶
Directories
¶
pb
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.