0

I have a web application with node + express. I want to record web request execution from start to end which include some db calls as well. How could I map the context of http request to db call context. I have tried async_hook APIs as well. Found that in case of db calls it uses the old connection instead of creating new connection. In this condition how can I map http request to db call? Thanks in advance.

1
  • can you clarify what you want to "record"? Are you trying to have your code add logging details to the request? I am also unclear on what you mean by "map the context" or even what you mean by context (which is often the "this" object in JS code). See if you can elaborate. Commented Jul 19, 2019 at 18:05

1 Answer 1

1

Try eizer Zipkin or this https://blog.risingstack.com/distributed-tracing-opentracing-node-js/

P.s. Db requests tracing - is painful task =)

Sign up to request clarification or add additional context in comments.

1 Comment

A link to a solution is welcome, but please ensure your answer is useful without it: add context around the link so your fellow users will have some idea what it is and why it’s there, then quote the most relevant part of the page you're linking to in case the target page is unavailable. Answers that are little more than a link may be deleted.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.