Documentation ¶
Index ¶
- Constants
- Variables
- type Factory
- func (f *Factory) AddFlags(flagSet *flag.FlagSet)
- func (f *Factory) Close() error
- func (f *Factory) CreateDependencyReader() (dependencystore.Reader, error)
- func (f *Factory) CreateSpanReader() (spanstore.Reader, error)
- func (f *Factory) CreateSpanWriter() (spanstore.Writer, error)
- func (f *Factory) InitFromOptions(o Options)
- func (f *Factory) InitFromViper(v *viper.Viper, logger *zap.Logger)
- func (f *Factory) Initialize(metricsFactory metrics.Factory, logger *zap.Logger) error
- type JSONUnmarshaller
- type Marshaller
- type Options
- type ProtobufUnmarshaller
- type SpanWriter
- type Unmarshaller
- type ZipkinThriftUnmarshaller
Constants ¶
const ( // EncodingJSON is used for spans encoded as Protobuf-based JSON. EncodingJSON = "json" // EncodingProto is used for spans encoded as Protobuf. EncodingProto = "protobuf" // EncodingZipkinThrift is used for spans encoded as Zipkin Thrift. EncodingZipkinThrift = "zipkin-thrift" )
Variables ¶
var ( // AllEncodings is a list of all supported encodings. AllEncodings = []string{EncodingJSON, EncodingProto, EncodingZipkinThrift} )
Functions ¶
This section is empty.
Types ¶
type Factory ¶
Factory implements storage.Factory and creates write-only storage components backed by kafka.
func (*Factory) CreateDependencyReader ¶
func (f *Factory) CreateDependencyReader() (dependencystore.Reader, error)
CreateDependencyReader implements storage.Factory
func (*Factory) CreateSpanReader ¶
CreateSpanReader implements storage.Factory
func (*Factory) CreateSpanWriter ¶
CreateSpanWriter implements storage.Factory
func (*Factory) InitFromOptions ¶ added in v1.18.0
InitFromOptions initializes factory from options.
func (*Factory) InitFromViper ¶
InitFromViper implements plugin.Configurable
type JSONUnmarshaller ¶ added in v1.7.0
type JSONUnmarshaller struct{}
JSONUnmarshaller implements Unmarshaller
func NewJSONUnmarshaller ¶ added in v1.7.0
func NewJSONUnmarshaller() *JSONUnmarshaller
NewJSONUnmarshaller constructs a JSONUnmarshaller
type Marshaller ¶
Marshaller encodes a span into a byte array to be sent to Kafka
type Options ¶
type Options struct { Config producer.Configuration `mapstructure:",squash"` Topic string `mapstructure:"topic"` Encoding string `mapstructure:"encoding"` }
Options stores the configuration options for Kafka
func (*Options) InitFromViper ¶
InitFromViper initializes Options with properties from viper
type ProtobufUnmarshaller ¶ added in v1.7.0
type ProtobufUnmarshaller struct{}
ProtobufUnmarshaller implements Unmarshaller
func NewProtobufUnmarshaller ¶ added in v1.7.0
func NewProtobufUnmarshaller() *ProtobufUnmarshaller
NewProtobufUnmarshaller constructs a ProtobufUnmarshaller
type SpanWriter ¶
type SpanWriter struct {
// contains filtered or unexported fields
}
SpanWriter writes spans to kafka. Implements spanstore.Writer
func NewSpanWriter ¶
func NewSpanWriter( producer sarama.AsyncProducer, marshaller Marshaller, topic string, factory metrics.Factory, logger *zap.Logger, ) *SpanWriter
NewSpanWriter initiates and returns a new kafka spanwriter
func (*SpanWriter) Close ¶
func (w *SpanWriter) Close() error
Close closes SpanWriter by closing producer
type Unmarshaller ¶ added in v1.7.0
Unmarshaller decodes a byte array to a span
type ZipkinThriftUnmarshaller ¶ added in v1.9.0
type ZipkinThriftUnmarshaller struct{}
ZipkinThriftUnmarshaller implements Unmarshaller
func NewZipkinThriftUnmarshaller ¶ added in v1.9.0
func NewZipkinThriftUnmarshaller() *ZipkinThriftUnmarshaller
NewZipkinThriftUnmarshaller constructs a zipkinThriftUnmarshaller