定制 taildev/php 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

taildev/php

Composer 安装命令:

composer require taildev/php

包简介

PHP integration for tail.dev

README 文档

README

PHP tests

For Laravel integration, see taildev/laravel

Docs

See full documentation at tail.dev/documentation/php/get-started

Quickstart

Install the taildev/php package using Composer

composer require taildev/php

Make sure that the composer autoloader is being required somewhere in your project:

require __DIR__ . '/vendor/autoload.php';

APM

Initialize APM with your auth token and service name (any name you'd like to identify this service)

use Tail\Apm;

Apm::init('secret_token', 'service-name');
Apm::startRequest(); 

register_shutdown_function(function () {
    Apm::finish();
});

Alternatively you can use startJob($name) for background jobs, CLI commands, etc. or startCustom($name)

To add spans to the transaction

$span = Apm::newDatabaseSpan('fetch-config');
// ... code fetching config
$span->finish();

Span "types" are used to categorize operations.

Apm::newSpan(string $type, string $name); // to use your own custom type
Apm::newCustomSpan($name); // type = "custom"
Apm::newDatabaseSpan($name); // type = "database"
Apm::newCacheSpan($name); // type = "cache"
Apm::newFilesystemSpan($name); // type = "filesystem"

Logs

Initialize logging with your auth token. You may optionally provide a service name and environment if you wish

use Tail\Log;

Log::init('secret_token', 'optional-service-name', 'optional-environment');

You can now use the logger anywhere to log a message

use Tail\Log;

Log::get()->debug('my debug message');

Log::get()->alert('something went wrong', ['custom_tag' => 'some-value']);

More

For full documentation see tail.dev/documentation/php/get-started

统计信息

  • 总下载量: 1.58k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-06-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固