node.js中的Web请求跟踪

问题描述 投票:0回答:1

我有一个带有node + express的Web应用程序。我想记录从头到尾的Web请求执行情况,其中还包括一些数据库调用。如何将http请求的上下文映射到数据库调用上下文。我也尝试过async_hook API。发现在db调用的情况下,它使用旧连接而不是创建新连接。在这种情况下,如何将http请求映射到数据库调用?预先感谢。

javascript node.js http trace instrumentation
1个回答
0
投票

尝试使用eizer Zipkin或此https://blog.risingstack.com/distributed-tracing-opentracing-node-js/

P.s。 db请求跟踪-任务艰巨=)

© www.soinside.com 2019 - 2024. All rights reserved.