Skip to content

[Code Quality] Message trace data send failed, but the failed logs are semantically ambiguous #2538

@xxd763795151

Description

@xxd763795151

An exception occur when sending trace data, the logs as follows:

                   @Override
                   public void onException(Throwable e) {
                       log.info("send trace data ,the traceData is " + data);
                   }

[log.info("send trace data ,the traceData is " + data)]: this can easily be mistaken for an ordinary log.

I have sent a lot of message, but I can not find their trace data by the message id. I spent a lot of time looking for the cause.
I can not see the reason through the log. But when I debug the source code, I found the failed cause of sending trace data: I enable acl but I forgot to config the authority of RMQ_SYS_TRACE_TOPIC.

If modify the code as follows(prompt has failed to send):

                    @Override
                    public void onException(Throwable e) {
                        log.info("send trace data failed, the traceData is " + data);
                    }

or print exception info:

                    @Override
                    public void onException(Throwable e) {
                        log.warn("send trace data failed, the traceData is " + data, e);
                    }

I think this way is more friendly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions