Giter Club home page Giter Club logo

arms's People

Contributors

adebug avatar tinywan avatar walkor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

arms's Issues

arms 插件 使用 request()报错

Error: Call to a member function tag() on null in /var/www/php/fj-dmp/vendor/webman/arms/src/Arms.php:43

request()->rootSpan->tag('db.statement', $query->sql . " /{$query->time}ms/");

阿里云还是收到了调用链

关于sql日志、请求入参、响应数据的记录

在实际项目中查看日志,我们不仅要知道入参是什么、响应数据是什么、实际执行的sql是什么样的,因此我在项目中做如下改造,希望官方能参考下。

一、sql日志里未完整呈现实际sql执行的情况:

$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();

希望能上报异常

目前,正在调试 ARMS 插件

在业务中,我们自己接管了异常

希望插件也能上报接管的异常

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.