Documentation ¶
Overview ¶
Package msgtracing contains msg middlewares to add opentracing support.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // PublisherComponentTag is added to each publisher span. PublisherComponentTag = ot.Tag{ Key: string(otext.Component), Value: "npmsg.publisher", } // AsyncPublisherComponentTag is added to each async publisher span. AsyncPublisherComponentTag = ot.Tag{ Key: string(otext.Component), Value: "npmsg.async.publisher", } // SubscriberComponentTag is added to each subscriber span. SubscriberComponentTag = ot.Tag{ Key: string(otext.Component), Value: "npmsg.subscriber", } )
View Source
var ( // PublisherOpName is used to generate operation name of a msg publish span. PublisherOpName = func(spec MsgSpec) string { return fmt.Sprintf("Msg Publisher %s", spec.SubjectName()) } // AsyncPublisherOpName is used to generate operation name of a async msg publish span. AsyncPublisherOpName = func(spec MsgSpec) string { return fmt.Sprintf("Msg AsyncPublisher %s", spec.SubjectName()) } // SubscriberOpName is used to generate operation name of a subscriber span. SubscriberOpName = func(spec MsgSpec, queue string) string { return fmt.Sprintf("Msg Subscriber %s:%s", spec.SubjectName(), queue) } )
Functions ¶
func WrapMsgAsyncPublisher ¶
WrapMsgAsyncPublisher adds opentracing support for MsgAsyncPublisher. Pass true to `downstream` if the publisher is used as msg pipe downstream.
func WrapMsgPublisher ¶
WrapMsgPublisher adds opentracing support for MsgPublisher. Pass true to `downstream` if the publisher is used as msg pipe downstream.
func WrapMsgSubscriber ¶
WrapMsgSubscriber adds opentracing support for MsgSubscriber.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.