Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RocketMQ agent plugin append trace info lost properties separator #93

Open
mxsl-gr opened this issue Jul 5, 2022 · 0 comments
Open

Comments

@mxsl-gr
Copy link
Contributor

mxsl-gr commented Jul 5, 2022

report bug.
RocketMQ agent plugin tracing lost property separator, when the message has properties.

  • when message has properties
TAGS�xxxterminus-request-spanid�xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  • desired properties
TAGS�xxx�terminus-request-spanid�xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

code: cloud.erda.agent.plugin.rocketmq.v4.MessageSendInterceptor:87

SendMessageRequestHeader requestHeader = (SendMessageRequestHeader) context.getArguments()[3];
StringBuilder properties = new StringBuilder(requestHeader.getProperties());
for (Map.Entry<String, String> entry : map.entrySet()) {
    if (entry.getValue() == null) {
        continue;
    }

    properties.append(entry.getKey())
            .append(MessageDecoder.NAME_VALUE_SEPARATOR)
            .append(entry.getValue())
            .append(MessageDecoder.PROPERTY_SEPARATOR);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant