chuan-yun / Molten

php probe for zipkin and opentracing
Apache License 2.0
793 stars 160 forks source link

feat: Make sink_http_uri settable in php #155

Open toby1991 opened 4 years ago

toby1991 commented 4 years ago

0x00 Purpose

When we have multi environment, such as Development or Production, we want to use different jaeger/zipkin for tracing, so this feature will let you make it!

0x01 Usage

ini_set('molten.sink_http_uri', 'http://127.0.0.1:9411/api/v1/spans')

0x02 Example

php -d extension=molten.so -d molten.enable=1 -d molten.open_report=1 -d molten.span_format="zipkin" -d molten.sink_type=4 -d molten.tracing_cli=1 -d molten.sampling_rate=1 -r 'ini_set("molten.service_name", "this_is_my_service");ini_set("molten.sink_http_uri", "http://127.0.0.1:9411/api/v1/spans");$c=curl_init("http://localhost:12345");curl_exec($c);'