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

Unable to print trace id and span id for undertow non-blocking IO server #4897

Closed
lokeshcse6 opened this issue Dec 14, 2021 · 2 comments · Fixed by #4950
Closed

Unable to print trace id and span id for undertow non-blocking IO server #4897

lokeshcse6 opened this issue Dec 14, 2021 · 2 comments · Fixed by #4950
Labels
bug Something isn't working

Comments

@lokeshcse6
Copy link

lokeshcse6 commented Dec 14, 2021

Describe the bug
When using dispatch API the traceid and span is are not generated in log file, without dispatch its able to generate

Steps to reproduce

public HttpHandler healthCheck() {
return exchange -> {
exchange.dispatch(() -> {
logger.info("inside demo health...");
exchange.setStatusCode(StatusCodes.OK);
exchange.getResponseHeaders().put(Headers.CONTENT_TYPE, "application/json");
exchange.getResponseSender().send(HEALTH_RESPONSE);
logger.info("inside exchange");
});
};
}

What did you expect to see?
In the below log trace_id and span_id should be printed
{"DateTime":"20211214T11:08:36.443Z","PID":"PID_IS_UNDEFINED","Class":"c.g.d.DemoController","Level":" INFO","Thread":"XNIO-1 task-1","Message":"inside demo helath...","TimeTaken":"","trace_id":"ab7687fskf465444545eab","span_id":"afe768ghc89","trace_flags":"01"}

What did you see instead?
A clear and concise description of what you saw instead.

{"DateTime":"20211214T11:08:36.443Z","PID":"PID_IS_UNDEFINED","Class":"c.g.d.DemoController","Level":" INFO","Thread":"XNIO-1 task-1","Message":"inside demo helath...","TimeTaken":"","trace_id":"","span_id":"","trace_flags":""}

What version are you using?
opentelemetry-javaagent:1.7.2

Environment
Compiler: oracle Jdk1.8
OS: windows/linux

Additional context
None

@lokeshcse6 lokeshcse6 added the bug Something isn't working label Dec 14, 2021
@mateuszrzeszutek
Copy link
Member

Hey @lokeshcse6 ,
What logger API (and which version) are you using?

@lokeshcse6
Copy link
Author

Hey @lokeshcse6 , What logger API (and which version) are you using?

logback with slf4j (1.7.30)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants