Skip to content

Commit 54830c9

Browse files
authored
1 parent 67500b2 commit 54830c9

File tree

1 file changed

+27
-7
lines changed

1 file changed

+27
-7
lines changed

installer/resources/tracer/opentracing.php

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,22 @@
77
* @link https://www.hyperf.io
88
* @document https://doc.hyperf.io
99
* @contact [email protected]
10-
* @license https://github.com/hyperf-cloud/hyperf/blob/master/LICENSE
10+
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
1212

1313
use Zipkin\Samplers\BinarySampler;
1414

1515
return [
16-
'default' => 'zikpin',
16+
'default' => env('TRACER_DRIVER', 'zipkin'),
1717
'enable' => [
18-
'guzzle' => false,
19-
'redis' => false,
20-
'db' => false,
21-
'method' => false,
18+
'guzzle' => env('TRACER_ENABLE_GUZZLE', false),
19+
'redis' => env('TRACER_ENABLE_REDIS', false),
20+
'db' => env('TRACER_ENABLE_DB', false),
21+
'method' => env('TRACER_ENABLE_METHOD', false),
2222
],
2323
'tracer' => [
2424
'zipkin' => [
25+
'driver' => Hyperf\Tracer\Adapter\ZipkinTracerFactory::class,
2526
'app' => [
2627
'name' => env('APP_NAME', 'skeleton'),
2728
// Hyperf will detect the system info automatically as the value if ipv4, ipv6, port is null
@@ -34,7 +35,26 @@
3435
'timeout' => env('ZIPKIN_TIMEOUT', 1),
3536
],
3637
'sampler' => BinarySampler::createAsAlwaysSample(),
37-
'driver' => Hyperf\Tracer\Adapter\ZipkinTracerFactory::class,
38+
],
39+
'jaeger' => [
40+
'driver' => Hyperf\Tracer\Adapter\JaegerTracerFactory::class,
41+
'name' => env('APP_NAME', 'skeleton'),
42+
'options' => [
43+
/*
44+
* You can uncomment the sampler lines to use custom strategy.
45+
*
46+
* For more available configurations,
47+
* @see https://github.com/jonahgeorge/jaeger-client-php
48+
*/
49+
// 'sampler' => [
50+
// 'type' => \Jaeger\SAMPLER_TYPE_CONST,
51+
// 'param' => true,
52+
// ],,
53+
'local_agent' => [
54+
'reporting_host' => env('JAEGER_REPORTING_HOST', 'localhost'),
55+
'reporting_port' => env('JAEGER_REPORTING_PORT', 5775),
56+
],
57+
],
3858
],
3959
],
4060
];

0 commit comments

Comments
 (0)