This is an automated email from the ASF dual-hosted git repository.

dinglei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-go.git


The following commit(s) were added to refs/heads/master by this push:
     new 39619b9  [ISSUE #899]Fix the groupName takes the namespace prefix 
(#900)
39619b9 is described below

commit 39619b9145d01056a8ce58e50bcbbdd51dd63bab
Author: zhangjidi2016 <[email protected]>
AuthorDate: Wed Aug 24 15:43:25 2022 +0800

    [ISSUE #899]Fix the groupName takes the namespace prefix (#900)
    
    Co-authored-by: zhangjidi <[email protected]>
---
 internal/trace.go | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/internal/trace.go b/internal/trace.go
index 490b7fb..891f3b6 100644
--- a/internal/trace.go
+++ b/internal/trace.go
@@ -169,7 +169,12 @@ func (ctx *TraceContext) marshal2Bean() *TraceTransferBean 
{
                        buffer.WriteRune(contentSplitter)
                        buffer.WriteString(strconv.FormatInt(ctx.TimeStamp, 10))
                        buffer.WriteRune(contentSplitter)
-                       buffer.WriteString(ctx.GroupName)
+                       ss := strings.Split(ctx.GroupName, "%")
+                       if len(ss) == 2 {
+                               buffer.WriteString(ss[1])
+                       } else {
+                               buffer.WriteString(ctx.GroupName)
+                       }
                        buffer.WriteRune(fieldSplitter)
                }
        }

Reply via email to