opentelemetry

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: Apache-2.0 Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNamedPublisherDecorator

func NewNamedPublisherDecorator(name string, pub message.Publisher, options ...Option) message.Publisher

NewNamedPublisherDecorator instantiates a PublisherDecorator with a provided name.

func NewPublisherDecorator

func NewPublisherDecorator(pub message.Publisher, options ...Option) message.Publisher

NewPublisherDecorator instantiates a PublisherDecorator with a default name.

func Trace

func Trace(options ...Option) message.HandlerMiddleware

Trace defines a middleware that will add tracing.

func TraceHandler

func TraceHandler(h message.HandlerFunc, options ...Option) message.HandlerFunc

TraceHandler decorates a watermill HandlerFunc to add tracing when a message is received.

func TraceNoPublishHandler

func TraceNoPublishHandler(h message.NoPublishHandlerFunc, options ...Option) message.NoPublishHandlerFunc

TraceNoPublishHandler decorates a watermill NoPublishHandlerFunc to add tracing when a message is received.

Types

type Option

type Option func(*config)

Option provides a convenience wrapper for simple options that can be represented as functions.

func WithSpanAttributes

func WithSpanAttributes(attributes ...attribute.KeyValue) Option

WithSpanAttributes includes the given attributes to the generated Spans.

type PublisherDecorator

type PublisherDecorator struct {
	// contains filtered or unexported fields
}

PublisherDecorator decorates a standard watermill publisher to add tracing capabilities.

func (*PublisherDecorator) Close

func (p *PublisherDecorator) Close() error

Close implements the watermill Publisher interface.

func (*PublisherDecorator) Publish

func (p *PublisherDecorator) Publish(topic string, messages ...*message.Message) error

Publish implements the watermill Publisher interface and creates traces. Publishing of messages are delegated to the decorated Publisher.

Jump to

Keyboard shortcuts

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