status 生成value统计

This commit is contained in:
dongwei 2019-02-12 16:08:31 +08:00
parent 710313a1b3
commit c27fac903f

View File

@ -49,7 +49,7 @@ class TunnelMiddleware
'monitor', 'monitor',
1, 1,
['app' => env('APP_NAME'), 'status' => $status, 'env' => app()->environment()], ['app' => env('APP_NAME'), 'status' => $status, 'env' => app()->environment()],
['content' => $request->getContent()] ['content' => $request->getContent(), 'status_value' => $status == 200 ? $status : -$status]
) )
); );
app('rpc.logger')->info('record to influxdb', ['rs' => $database->writePoints($points, Database::PRECISION_SECONDS)]); app('rpc.logger')->info('record to influxdb', ['rs' => $database->writePoints($points, Database::PRECISION_SECONDS)]);