weixin_39945178
weixin_39945178
2021-01-08 21:01

调用链追踪 zipkin 按照文档配置完了,怎么使用呢

介于本地调试困难,想着接一个zipkin,但是配置好了之后并不知道怎么用,求大佬解惑:废话少说直接上配置:

return [ 'default' => env('TRACER_DRIVER', 'zipkin'), 'enable' => [ 'guzzle' => env('TRACER_ENABLE_GUZZLE', true), 'redis' => env('TRACER_ENABLE_REDIS', true), 'db' => env('TRACER_ENABLE_DB', true), 'method' => env('TRACER_ENABLE_METHOD', true), ], 'tracer' => [ 'zipkin' => [ 'driver' => Hyperf\Tracer\Adapter\ZipkinTracerFactory::class, 'app' => [ 'name' => env('APP_NAME', 'skeleton'), // Hyperf will detect the system info automatically as the value if ipv4, ipv6, port is null 'ipv4' => '127.0.0.1', 'ipv6' => null, 'port' => 9501, ], 'options' => [ 'endpoint_url' => env('ZIPKIN_ENDPOINT_URL', 'http://localhost:9411/api/v2/spans'), 'timeout' => env('ZIPKIN_TIMEOUT', 20), ], 'sampler' => BinarySampler::createAsAlwaysSample(), ], 'jaeger' => [ 'driver' => Hyperf\Tracer\Adapter\JaegerTracerFactory::class, 'name' => env('APP_NAME', 'skeleton'), 'options' => [ / * You can uncomment the sampler lines to use custom strategy. * * For more available configurations, * https://github.com/jonahgeorge/jaeger-client-php / // 'sampler' => [ // 'type' => \Jaeger\SAMPLER_TYPE_CONST, // 'param' => true, // ],, 'local_agent' => [ 'reporting_host' => env('JAEGER_REPORTING_HOST', 'localhost'), 'reporting_port' => env('JAEGER_REPORTING_PORT', 5775), ], ], ], ], 'tags' => [ 'http_client' => [ 'http.url' => 'http.url', 'http.method' => 'http.method', 'http.status_code' => 'http.status_code', ], 'redis' => [ 'arguments' => 'arguments', 'result' => 'result', ], 'db' => [ 'db.query' => 'db.query', 'db.statement' => 'db.statement', 'db.query_time' => 'db.query_time', ], ],

image

该提问来源于开源项目:hyperf/hyperf

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

6条回答

  • weixin_39947016 weixin_39947016 4月前

    中间件加了么

    点赞 评论 复制链接分享
  • weixin_39945178 weixin_39945178 4月前

    中间件加了么

    应该是没有加,我是按照官方给的实例来的

    点赞 评论 复制链接分享
  • weixin_39945178 weixin_39945178 4月前

    中间件加了么

    怎么加大佬

    点赞 评论 复制链接分享
  • weixin_39724889 weixin_39724889 4月前

    文档写得很清楚了

    点赞 评论 复制链接分享
  • weixin_39552768 weixin_39552768 4月前

    加了中间件也没有用,怎么办

    点赞 评论 复制链接分享
  • weixin_39572316 weixin_39572316 4月前

    加了中间件也没有用,怎么办

    你可以捉一下包看一下报上去没有,先确定好问题范围。

    点赞 评论 复制链接分享

相关推荐