From 89c7ed46e35f65f81bd4d4181e6c03251257cc2f Mon Sep 17 00:00:00 2001 From: vyzo Date: Mon, 4 Nov 2019 20:04:55 +0200 Subject: [PATCH] trace publish --- pubsub.go | 1 + trace.go | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/pubsub.go b/pubsub.go index 7237259..d8fc964 100644 --- a/pubsub.go +++ b/pubsub.go @@ -446,6 +446,7 @@ func (p *PubSub) processLoop(ctx context.Context) { p.handleIncomingRPC(rpc) case msg := <-p.publish: + p.tracer.PublishMessage(msg) p.pushMsg(msg) case msg := <-p.sendMsg: diff --git a/trace.go b/trace.go index 08ec219..fc24f76 100644 --- a/trace.go +++ b/trace.go @@ -14,6 +14,12 @@ type pubsubTracer struct { tracer EventTracer } +func (t *pubsubTracer) PublishMessage(msg *Message) { + if t != nil { + // TODO + } +} + func (t *pubsubTracer) RejectMessage(msg *Message, reason string) { if t != nil { // TODO