chocofamilyme/pathcorrelation

用于跟踪服务间请求的库

0.2.4 2018-12-24 02:58 UTC

This package is auto-updated.

Last update: 2024-09-24 15:25:22 UTC


README

用于跟踪服务间请求的库

需求

- Phalcon > 3.0.0

使用说明

为当前请求生成 correlation_id 和 span_id,如果之前没有的话。对于下一个请求,需要在 query 参数中填充 correlation_id 和 span_id。

$params = CorrelationId::getInstance()->getCurrentQueryParams();

$url = "https://example.com?correlation_id=$params['correlation_id']&span_id=$params['span_id']";