zipkin

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2021 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ZipkinHost  = "host"
	ServiceName = "name"
)

These const's contain the connection string keys to different values

View Source
const (
	ActionTag  = "commander.message.action"
	VersionTag = "commander.message.version"
)

Zipkin span tags

Variables

This section is empty.

Functions

func ValidateConnectionKeyVal

func ValidateConnectionKeyVal(values ConnectionMap) error

ValidateConnectionKeyVal validates if all required valyues are set in the given connectionmap

Types

type Config

type Config struct {
	ZipkinHost  string
	ServiceName string
}

Config contains all the plausible configuration options

func NewConfig

func NewConfig(values ConnectionMap) (Config, error)

NewConfig constructs a Config from the given connection map

type ConnectionMap

type ConnectionMap map[string]string

ConnectionMap contains the connectionstring as a key/value map

func ParseConnectionstring

func ParseConnectionstring(connectionstring string) ConnectionMap

ParseConnectionstring parses the given connectionstring and returns a map with all key/values

type Zipkin

type Zipkin struct {
	Reporter reporter.Reporter
	Tracer   *zipkin.Tracer
	Config   Config
}

Zipkin represents a Zipkin middleware instance

func New

func New(connectionstring string) (*Zipkin, error)

New initializes a new Zipkin commander middleware reporter

func (*Zipkin) AfterConsumeSpan added in v0.6.0

func (controller *Zipkin) AfterConsumeSpan(message *types.Message)

AfterConsumeSpan finishes the stored span in the message context

func (*Zipkin) AfterPublishSpan added in v0.6.0

func (controller *Zipkin) AfterPublishSpan(message *types.Message)

AfterPublishSpan closes the producing span

func (*Zipkin) BeforeConsume

BeforeConsume middleware controller

func (*Zipkin) BeforeProduce added in v0.6.0

BeforeProduce middleware controller

func (*Zipkin) Close

func (controller *Zipkin) Close() error

Close closes the Zipkin reporter

func (*Zipkin) NewConsumeSpan added in v0.6.0

func (controller *Zipkin) NewConsumeSpan(message *types.Message)

NewConsumeSpan starts a new span and stores it in the message context

func (*Zipkin) NewProduceSpan added in v0.6.0

func (controller *Zipkin) NewProduceSpan(message *types.Message)

NewProduceSpan prepares the given message span headers

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL