Documentation ¶
Index ¶
- Constants
- func DestinationTopic(topic string) attribute.KeyValue
- func EndSpan(s oteltrace.Span, err error)
- func MessageHeaders(headers amqp.Table) []attribute.KeyValue
- func MessageKey(messageID string) attribute.KeyValue
- func Operation(operationName Op) attribute.KeyValue
- func RoutingKey(routingKey string) attribute.KeyValue
- func SystemKey() attribute.KeyValue
- type MessageCarrier
- type Op
- type ProducerMessageCarrier
Constants ¶
View Source
const OtelLibraryName = "github.com/patrickjmcd/bunny"
Variables ¶
This section is empty.
Functions ¶
func DestinationTopic ¶
func MessageKey ¶
func RoutingKey ¶
Types ¶
type MessageCarrier ¶
type MessageCarrier struct {
// contains filtered or unexported fields
}
MessageCarrier injects and extracts traces from an amqp.Delivery.
func NewMessageCarrier ¶
func NewMessageCarrier(msg *amqp.Delivery) MessageCarrier
NewMessageCarrier creates a new MessageCarrier.
func (MessageCarrier) Get ¶
func (c MessageCarrier) Get(key string) string
Get retrieves a single value for a given key from rabbit message headers.
func (MessageCarrier) Keys ¶
func (c MessageCarrier) Keys() []string
Keys returns all keys identifiers from the message headers.
func (MessageCarrier) Set ¶
func (c MessageCarrier) Set(key, value string)
Set sets a header on rabbit message.
type ProducerMessageCarrier ¶
type ProducerMessageCarrier struct {
// contains filtered or unexported fields
}
ProducerMessageCarrier injects and extracts traces from a rabbit message.
func NewProducerMessageCarrier ¶
func NewProducerMessageCarrier(msg *amqp.Publishing) ProducerMessageCarrier
NewProducerMessageCarrier creates a new MessageCarrier.
func (ProducerMessageCarrier) Get ¶
func (c ProducerMessageCarrier) Get(key string) string
Get retrieves a single value for a given key from rabbit message headers.
func (ProducerMessageCarrier) Keys ¶
func (c ProducerMessageCarrier) Keys() []string
Keys returns all keys identifiers from the message headers.
func (ProducerMessageCarrier) Set ¶
func (c ProducerMessageCarrier) Set(key, value string)
Set sets a header on rabbit message.
Click to show internal directories.
Click to hide internal directories.