Download the PHP package nango/swoft-tracker without Composer

On this page you can find all versions of the php package nango/swoft-tracker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package swoft-tracker

swoft-tracker

该库主要通过设置traceid,spanid,来实现日志链路记录,保证同一请求的链路traceid一致;
并且增加RedisHandler可以将日志直接记录到redis中(协程方式),后续可以通过ELK同步日志;另外通过日志配置增加version、interface、method、params、cost(时间消耗)的日志记录

要求

该库的日志记录级别为info,请打开相关日志级别记录。

用法

配置

bean.php文件中进行配置;

如果应用只提供RPC服务,则需要在bean.php中添加,RPC中间件来记录相关日志;如下:

如果应用需要对外提供HTTP服务,并且内部需要通过RPC调用其他微服务的话,则需要在bean.php中进行以下配置:

首先增加HTTP中间件:

另外,RPC CLient增加extender配置:

以上配置就可以实现,多服务之间调用时的日志链路追踪。

logger配置

使用RedisHandler,可以指定连接池,将业务redis库和日志库隔离开;简单配置如下:

非swoft框架 RPC调用

如果需要在非swoft框架中通过RPC调用swoft的微服务的话,需要在ext中增加traceid参数,如下:


All versions of swoft-tracker with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nango/swoft-tracker contains the following files

Loading the files please wait ....