We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
$contents = "[{$query->time} ms] " . vsprintf(str_replace('?', "'%s'", $query->sql), $query->bindings); $sqlSpan = $tracer->newChild($rootSpan->getContext()); $sqlSpan->setName(SQL_QUERY . ':' . $query->connectionName); $sqlSpan->start(); $sqlSpan->tag('db.statement', $contents); $sqlSpan->finish();
//记录入参 $paramsSpan = $tracer->newChild($rootSpan->getContext()); $paramsSpan->setName("Request:Params"); $paramsSpan->start(); $paramsSpan->tag('request.params', json_encode($request->all(), JSON_UNESCAPED_UNICODE)); $paramsSpan->finish();
//记录响应内容 $responseSpan = $tracer->newChild($rootSpan->getContext()); $responseSpan->setName("Response:body"); $responseSpan->start(); $responseSpan->tag('response.body', $result->rawBody()); $responseSpan->finish();
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
在实际项目中查看日志,我们不仅要知道入参是什么、响应数据是什么、实际执行的sql是什么样的,因此我在项目中做如下改造,希望官方能参考下。
一、sql日志里未完整呈现实际sql执行的情况:
二、需要知道入参是什么:
三、需要知道响应数据是什么:
The text was updated successfully, but these errors were encountered: