pinpoint icon indicating copy to clipboard operation
pinpoint copied to clipboard

Linefeed does not work normally in the message field of the Timeline Event

Open koo-taejin opened this issue 2 years ago • 2 comments

Hello :)

description

I have checked that the linefeed does not work properly in the message field of the Timeline Event in Inspector when a deadlock event occurs.

image

how to reproduce

Reproduction is simple.

If you send a request by including the code in controller on any of testweb project After a while, a Deadlock detected event will occur on the web.

    @GetMapping("/client/deadlock")
    public String deadlock() {
        ThreadDemo1 T1 = new ThreadDemo1();
        ThreadDemo2 T2 = new ThreadDemo2();
        T1.start();
        T2.start(); 
        return "deadlock is coming";
    }

    public static Object Lock1 = new Object();
    public static Object Lock2 = new Object();

    private static class ThreadDemo1 extends Thread {

        public void run() {
            synchronized (Lock1) {
                try {
                    Thread.sleep(10);
                } catch (InterruptedException e) {
                }
                synchronized (Lock2) {
                }
            }
        }
    }

    private static class ThreadDemo2 extends Thread {

        public void run() {
            synchronized (Lock2) {
                try {
                    Thread.sleep(10);
                } catch (InterruptedException e) {
                }
                synchronized (Lock1) {
                }
            }
        }
    }

If you need any additional information, please feel free to let me know.

koo-taejin avatar Apr 13 '22 02:04 koo-taejin

@koo-taejin Ok I'll check this issue.

minwoo-jung avatar Apr 18 '22 09:04 minwoo-jung

There was a similar issue.(https://github.com/pinpoint-apm/pinpoint/commit/65daeefa603fb5f7a93e562049504c9e7fdac215 )

I remembered that TypeScript does not recognize '\n', so frontend has to change html <br> message.

koo-taejin avatar Apr 18 '22 09:04 koo-taejin