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

链路中有线程切换的怎么追踪? #5

Open
dempeZheng opened this issue Jun 1, 2018 · 0 comments
Open

链路中有线程切换的怎么追踪? #5

dempeZheng opened this issue Jun 1, 2018 · 0 comments

Comments

@dempeZheng
Copy link

dempeZheng commented Jun 1, 2018

类似这种,链路中有用到线程池,怎么追踪整条链路

@RequestMapping("/service2")
    @ResponseBody
    public String service() throws Exception {
        Thread.sleep(100);
        Executors.newCachedThreadPool().submit(new Runnable() {
            @Override
            public void run() {
                HttpGet get = new HttpGet("http://localhost:8084/service4");
                try {
                    CloseableHttpResponse response = httpClient.execute(get);

                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        });
        return "test";
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant