This repository has been archived by the owner on Jul 13, 2023. It is now read-only.
forked from hyperf/tracer
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CORE-909] Adiciona nome do Span raiz (#13)
- Loading branch information
1 parent
c6f1ae7
commit 91c0f2a
Showing
19 changed files
with
166 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
vendor/ | ||
*.cache | ||
/.idea | ||
.idea/ | ||
clover-coverage-report.xml | ||
coverage/ | ||
runtime/ | ||
vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
declare(strict_types=1); | ||
/** | ||
* This file is part of Hyperf + PicPay. | ||
* | ||
* @link https://github.com/PicPay/hyperf-tracer | ||
* @document https://github.com/PicPay/hyperf-tracer/wiki | ||
* @contact @PicPay | ||
* @license https://github.com/PicPay/hyperf-tracer/blob/main/LICENSE | ||
*/ | ||
ini_set('display_errors', 'on'); | ||
ini_set('display_startup_errors', 'on'); | ||
|
||
require_once __DIR__ . '/../config/consts.php'; | ||
require_once __DIR__ . '/../vendor/autoload.php'; | ||
|
||
error_reporting(E_ALL); | ||
date_default_timezone_set('America/Sao_Paulo'); | ||
|
||
Hyperf\Di\ClassLoader::init(); | ||
|
||
Swoole\Runtime::enableCoroutine(true); | ||
|
||
Swoole\Coroutine::set([ | ||
'hook_flags' => SWOOLE_HOOK_ALL, | ||
'exit_condition' => static fn (): bool => Swoole\Coroutine::stats()['coroutine_num'] === 0, | ||
]); | ||
|
||
$code = 0; | ||
Swoole\Coroutine\run(static function () use (&$code): void { | ||
try { | ||
$code = PHPUnit\TextUI\Command::main(false); | ||
} catch (PHPUnit\TextUI\RuntimeException $e) { | ||
if ($e->getMessage() === 'swoole exit') { | ||
return; | ||
} | ||
|
||
throw $e; | ||
} finally { | ||
Swoole\Timer::clearAll(); | ||
Hyperf\Utils\Coordinator\CoordinatorManager::until(Hyperf\Utils\Coordinator\Constants::WORKER_EXIT)->resume(); | ||
} | ||
}); | ||
exit($code); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
/** | ||
* This file is part of Hyperf + PicPay. | ||
* | ||
* @link https://github.com/PicPay/hyperf-tracer | ||
* @document https://github.com/PicPay/hyperf-tracer/wiki | ||
* @contact @PicPay | ||
* @license https://github.com/PicPay/hyperf-tracer/blob/main/LICENSE | ||
*/ | ||
return [ | ||
'scan' => [ | ||
'paths' => [ | ||
BASE_PATH . '/src', | ||
], | ||
'ignore_annotations' => [ | ||
'mixin', | ||
], | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
/** | ||
* This file is part of Hyperf + PicPay. | ||
* | ||
* @link https://github.com/PicPay/hyperf-tracer | ||
* @document https://github.com/PicPay/hyperf-tracer/wiki | ||
* @contact @PicPay | ||
* @license https://github.com/PicPay/hyperf-tracer/blob/main/LICENSE | ||
*/ | ||
! defined('BASE_PATH') && define('BASE_PATH', dirname(__DIR__, 1)); | ||
! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_ALL); | ||
! defined('DEFAULT_TIMEZONE') && define('DEFAULT_TIMEZONE', 'America/Sao_Paulo'); | ||
! defined('DEFAULT_APP_NAME') && define('DEFAULT_APP_NAME', 'ms-transaction-refund'); | ||
! defined('DEFAULT_APP_ENV') && define('DEFAULT_APP_ENV', 'dev'); | ||
! defined('CURRENT_VERSION') && define('CURRENT_VERSION', '0.1.0'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" colors="true"> | ||
<coverage> | ||
<include> | ||
<directory>src</directory> | ||
</include> | ||
<report> | ||
<clover outputFile="clover-coverage-report.xml" /> | ||
<html outputDirectory="coverage" /> | ||
</report> | ||
</coverage> | ||
<testsuites> | ||
<testsuite name="Unit"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,9 +20,6 @@ | |
*/ | ||
class Trace extends AbstractAnnotation | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
public string $name = ''; | ||
|
||
/** | ||
|
Oops, something went wrong.