diff options
Diffstat (limited to 'vendor/jonahgeorge/jaeger-client-php')
138 files changed, 0 insertions, 11245 deletions
diff --git a/vendor/jonahgeorge/jaeger-client-php/.editorconfig b/vendor/jonahgeorge/jaeger-client-php/.editorconfig deleted file mode 100644 index 1492202b4..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/.editorconfig +++ /dev/null @@ -1,16 +0,0 @@ -root = true - -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true - -[*.md] -trim_trailing_whitespace = false - -[*.yml] -indent_style = space -indent_size = 2 diff --git a/vendor/jonahgeorge/jaeger-client-php/.github/workflows/main.yaml b/vendor/jonahgeorge/jaeger-client-php/.github/workflows/main.yaml deleted file mode 100644 index d0e5dc1f5..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/.github/workflows/main.yaml +++ /dev/null @@ -1,44 +0,0 @@ -name: Test - -on: [push, pull_request] - -jobs: - run: - runs-on: ubuntu-latest - strategy: - matrix: - php-versions: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1'] - name: PHP ${{ matrix.php-versions }} - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - coverage: xdebug - - - name: Get composer cache directory - id: composercache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Cache dependencies - uses: actions/cache@v2 - with: - path: ${{ steps.composercache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - - name: Install dependencies - run: | - composer install \ - --no-interaction \ - --no-ansi \ - --no-progress - - - name: Run lint - run: composer lint - - - name: Run test - run: composer test diff --git a/vendor/jonahgeorge/jaeger-client-php/.gitignore b/vendor/jonahgeorge/jaeger-client-php/.gitignore deleted file mode 100644 index 07dc555db..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -# Please do not use this ignore file to define platform specific files. -# -# For these purposes create a global .gitignore file, which is a list of rules -# for ignoring files in every Git repository on your computer. -# -# https://help.github.com/articles/ignoring-files/#create-a-global-gitignore - -jaeger-idl -vendor - -composer.lock -composer.phar - -jaeger-client-php.iml - -phpunit.xml -phpcs.xml diff --git a/vendor/jonahgeorge/jaeger-client-php/CONTRIBUTING.md b/vendor/jonahgeorge/jaeger-client-php/CONTRIBUTING.md deleted file mode 100644 index e5ec5ed4f..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/CONTRIBUTING.md +++ /dev/null @@ -1,3 +0,0 @@ -# How to Contribute to Jaeger - -We'd love your help! diff --git a/vendor/jonahgeorge/jaeger-client-php/LICENSE b/vendor/jonahgeorge/jaeger-client-php/LICENSE deleted file mode 100644 index 8e37af0cb..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 Jonah George, José Carlos Chávez - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/jonahgeorge/jaeger-client-php/README.md b/vendor/jonahgeorge/jaeger-client-php/README.md deleted file mode 100644 index 6396bb70f..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/README.md +++ /dev/null @@ -1,219 +0,0 @@ -![Build Status](https://github.com/jonahgeorge/jaeger-client-php/workflows/Test/badge.svg) [![PHP version][packagist-img]][packagist] - -# Jaeger Bindings for PHP OpenTracing API - -This is a client-side library that can be used to instrument PHP apps for distributed trace collection, -and to send those traces to Jaeger. See the [OpenTracing PHP API](https://github.com/opentracing/opentracing-php) -for additional detail. - -## Contributing and Developing - -Please see [CONTRIBUTING.md](./CONTRIBUTING.md). - -## Installation - -Jaeger client can be installed via Composer: - -```bash -composer require jonahgeorge/jaeger-client-php -``` - -## Getting Started - -```php -<?php - -require_once 'vendor/autoload.php'; - -use Jaeger\Config; -use OpenTracing\GlobalTracer; - -$config = new Config( - [ - 'sampler' => [ - 'type' => Jaeger\SAMPLER_TYPE_CONST, - 'param' => true, - ], - 'logging' => true, - ], - 'your-app-name' -); -$config->initializeTracer(); - -$tracer = GlobalTracer::get(); - -$scope = $tracer->startActiveSpan('TestSpan', []); -$scope->close(); - -$tracer->flush(); -``` - -### Samplers - -List of supported samplers, for more info about samplers, please read [Jaeger Sampling](https://www.jaegertracing.io/docs/1.9/sampling/) guide. - -#### Const sampler -This sampler either samples everything, or nothing. - -##### Configuration -``` -'sampler' => [ - 'type' => Jaeger\SAMPLER_TYPE_CONST, - 'param' => true, // boolean wheter to trace or not -], -``` - -#### Probabilistic sampler -This sampler samples request by given rate. - -##### Configuration -``` -'sampler' => [ - 'type' => Jaeger\SAMPLER_TYPE_PROBABILISTIC, - 'param' => 0.5, // float [0.0, 1.0] -], -``` - -#### Rate limiting sampler -Samples maximum specified number of traces (requests) per second. - -##### Requirements -* `psr/cache` PSR-6 cache component to store and retrieve sampler state between requests. -Cache component is passed to `Jaeger\Config` trough its constructor. -* `hrtime()` function, that can retrieve time in nanoseconds. You need either `php 7.3` or [PECL/hrtime](http://pecl.php.net/package/hrtime) extension. - -##### Configuration -``` -'sampler' => [ - 'type' => Jaeger\SAMPLER_TYPE_RATE_LIMITING, - 'param' => 100 // integer maximum number of traces per second, - 'cache' => [ - 'currentBalanceKey' => 'rate.currentBalance' // string - 'lastTickKey' => 'rate.lastTick' // string - ] -], -``` -## Dispatch mode - -The library supports 3 ways of sending data to Jaeger Agent: - -1. `Zipkin.thrift` over Compact protocol (socket - UDP) - default -2. `Jaeger.thrift` over Binary protocol (socket - UDP) -2. `Jaeger.thrift` over Binary protocol (HTTP) - -If you want to enable "`Jaeger.thrift` over Binary protocol" one or other, than -you need to set `dispatch_mode` config option or `JAEGER_DISPATCH_MODE` env -variable. - -Allowed values for `dispatch_mode` are: -- `jaeger_over_binary_udp` -- `jaeger_over_binary_http` -- `zipkin_over_compact_udp` - -There are 3 constants available, so it is better to use them: -```php -class Config -{ - const ZIPKIN_OVER_COMPACT_UDP = "zipkin_over_compact_udp"; - const JAEGER_OVER_BINARY_UDP = "jaeger_over_binary_udp"; - const JAEGER_OVER_BINARY_HTTP = "jaeger_over_binary_http"; - ... -} -``` - -A possible config with custom `dispatch_mode` can look like this: -```php -// config.php - -use Jaeger\Config; - -return [ - 'sampler' => [ - 'type' => Jaeger\SAMPLER_TYPE_CONST, - 'param' => true, - ], - 'logging' => true, - "tags" => [ - // process. prefix works only with JAEGER_OVER_HTTP, JAEGER_OVER_BINARY - // otherwise it will be shown as simple global tag - "process.process-tag-key-1" => "process-value-1", // all tags with `process.` prefix goes to process section - "process.process-tag-key-2" => "process-value-2", // all tags with `process.` prefix goes to process section - "global-tag-key-1" => "global-tag-value-1", // this tag will be appended to all spans - "global-tag-key-2" => "global-tag-value-2", // this tag will be appended to all spans - ], - "local_agent" => [ - "reporting_host" => "localhost", -// You can override port by setting local_agent.reporting_port value - "reporting_port" => 6832 - ], -// Different ways to send data to Jaeger. Config::ZIPKIN_OVER_COMPACT - default): - 'dispatch_mode' => Config::JAEGER_OVER_BINARY_UDP, -]; -``` -The full example you can see at `examples` directory. - -By default, for each `dispatch_mode` there is default `reporting_port` config value. Table with -default values you can see below: - -`dispatch_mode` | default `reporting_port` ------------------------- | ---------------- -ZIPKIN_OVER_COMPACT_UDP | 5775 -JAEGER_OVER_BINARY_UDP | 6832 -JAEGER_OVER_BINARY_HTTP | 14268 - -## IPv6 - -In case you need IPv6 support you need to set `ip_version` Config variable. -By default, IPv4 is used. There is an alias `Config::IP_VERSION` which you can use -as an alternative to raw `ip_version`. - -Example: - -```php -use Jaeger\Config; - -$config = new Config( - [ - "ip_version" => Config::IPV6, // <-- or use Config::IP_VERSION constant - 'logging' => true, - 'dispatch_mode' => Config::JAEGER_OVER_BINARY_UDP, - ], - 'serviceNameExample', -); -$config->initializeTracer(); -``` -or - -```php -use Jaeger\Config; - -$config = new Config( - [ - Config::IP_VERSION => Config::IPV6, // <-- - 'logging' => true, - 'dispatch_mode' => Config::JAEGER_OVER_BINARY_UDP, - ], - 'serviceNameExample', -); -$config->initializeTracer(); -``` - - -## Testing - -Tests are located in the `tests` directory. See [tests/README.md](./tests/README.md). - -## Roadmap - -- [Support Span baggage](https://github.com/jonahgeorge/jaeger-client-php/issues/5) -- [Support Tracer metrics](https://github.com/jonahgeorge/jaeger-client-php/issues/12) -- [Support Tracer error reporting](https://github.com/jonahgeorge/jaeger-client-php/issues/13) - -## License - -[MIT License](./LICENSE). - -[ci-img]: https://travis-ci.org/jonahgeorge/jaeger-client-php.svg?branch=travis -[ci]: https://travis-ci.org/jonahgeorge/jaeger-client-php -[packagist-img]: https://badge.fury.io/ph/jonahgeorge%2Fjaeger-client-php.svg -[packagist]: https://badge.fury.io/ph/jonahgeorge%2Fjaeger-client-php diff --git a/vendor/jonahgeorge/jaeger-client-php/build/.gitignore b/vendor/jonahgeorge/jaeger-client-php/build/.gitignore deleted file mode 100644 index d6b7ef32c..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/build/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/vendor/jonahgeorge/jaeger-client-php/composer.json b/vendor/jonahgeorge/jaeger-client-php/composer.json deleted file mode 100644 index a9bb99a06..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/composer.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "jonahgeorge/jaeger-client-php", - "description": "Jaeger Bindings for PHP OpenTracing API", - "keywords": [ - "jaeger", - "opentracing", - "trace", - "tracing" - ], - "license": "MIT", - "authors": [ - { - "name": "Jonah George", - "homepage": "http://twitter.com/jonahgeorge" - }, - { - "name": "José Carlos Chávez", - "email": "[email protected]" - }, - { - "name": "Contributors", - "homepage": "https://github.com/jonahgeorge/jaeger-client-php/graphs/contributors" - } - ], - "require": { - "php": "^7.1 || ^8.0 || ^8.1", - "ext-sockets": "*", - "opentracing/opentracing": "^1.0", - "packaged/thrift": "^0.13", - "psr/cache": "^1.0 || ^2.0 || ^3.0", - "psr/log": "^1.0 || ^2.0 || ^3.0" - }, - "require-dev": { - "phpunit/phpunit": "^7 || ^8 || ^9", - "squizlabs/php_codesniffer": "3.*", - "cache/array-adapter": "^1.0", - "symfony/polyfill-php73": "^1.10" - }, - "config": { - "optimize-autoloader": true, - "preferred-install": "dist", - "sort-packages": true - }, - "autoload": { - "psr-4": { - "Jaeger\\": "src/Jaeger/" - }, - "files": [ - "./src/Jaeger/Constants.php" - ] - }, - "autoload-dev": { - "Jaeger\\Tests\\": "tests/Jaeger/" - }, - "minimum-stability": "dev", - "prefer-stable": true, - "scripts": { - "fix-lint": "./vendor/bin/phpcbf", - "lint": "./vendor/bin/phpcs", - "test": "./vendor/bin/phpunit" - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/examples/config.php b/vendor/jonahgeorge/jaeger-client-php/examples/config.php deleted file mode 100644 index 5c4726165..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/examples/config.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php - -use Jaeger\Config; - -return [ - 'sampler' => [ - 'type' => Jaeger\SAMPLER_TYPE_CONST, - 'param' => true, - ], - 'logging' => true, - "tags" => [ - // process. prefix works only with JAEGER_OVER_HTTP, JAEGER_OVER_BINARY - // otherwise it will be shown as simple global tag - "process.process-tag-key-1" => "process-value-1", // all tags with `process.` prefix goes to process section - "process.process-tag-key-2" => "process-value-2", // all tags with `process.` prefix goes to process section - "global-tag-key-1" => "global-tag-value-1", // this tag will be appended to all spans - "global-tag-key-2" => "global-tag-value-2", // this tag will be appended to all spans - ], - "local_agent" => [ - "reporting_host" => "localhost", -// You can override port by setting local_agent.reporting_port value -// "reporting_port" => 6832 - ], -// Different ways to send data to Jaeger. Config::ZIPKIN_OVER_COMPACT - default): - 'dispatch_mode' => Config::JAEGER_OVER_BINARY_UDP, -]; diff --git a/vendor/jonahgeorge/jaeger-client-php/examples/jaeger.php b/vendor/jonahgeorge/jaeger-client-php/examples/jaeger.php deleted file mode 100644 index ed9304fe2..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/examples/jaeger.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php - -require_once __DIR__.'/../vendor/autoload.php'; - -use Jaeger\Config; -use OpenTracing\GlobalTracer; - -$config = new Config( - require_once __DIR__.'/config.php', - 'your-app-name' -); - -$config->initializeTracer(); - -$tracer = GlobalTracer::get(); - -$scope = $tracer->startActiveSpan('JaegerSpan', []); -$scope->getSpan()->setTag("tag1", "value1"); -$scope->getSpan()->setTag("tag2", "value2"); -$scope->getSpan()->setTag("tag3", "value2"); -$scope->getSpan()->log([ - "key1" => "value1", - "key2" => 2, - "key3" => true -]); - -$scope->getSpan()->addBaggageItem("baggage-item1", "baggage-value1"); -$scope->getSpan()->addBaggageItem("baggage-item2", "baggage-value2"); -$scope->getSpan()->addBaggageItem("baggage-item3", "baggage-value3"); - - $nestedSpanScope = $tracer->startActiveSpan("Nested1"); - $nestedSpanScope->getSpan()->setTag("tag1", "value1"); - $nestedSpanScope->getSpan()->setTag("tag2", "value2"); - $nestedSpanScope->getSpan()->setTag("tag3", "value2"); - $nestedSpanScope->getSpan()->log([ - "key1" => "value1", - "key2" => 2, - "key3" => true - ]); - - $nestedSpanScope->getSpan()->addBaggageItem("baggage-item1", "baggage-value1"); - $nestedSpanScope->getSpan()->addBaggageItem("baggage-item2", "baggage-value2"); - $nestedSpanScope->getSpan()->addBaggageItem("baggage-item3", "baggage-value3"); - - sleep(1); - - $nestedSpanScope->close(); - -sleep(1); -$scope->close(); -$tracer->flush(); diff --git a/vendor/jonahgeorge/jaeger-client-php/phpcs.xml.dist b/vendor/jonahgeorge/jaeger-client-php/phpcs.xml.dist deleted file mode 100644 index 7d5db0974..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/phpcs.xml.dist +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0"?> -<ruleset name="Jaeger"> - - <!-- - The name attribute of the ruleset tag is displayed - when running PHP_CodeSniffer with the -v command line - argument. The description tag below is not displayed anywhere - except in this file, so it can contain information for - developers who may change this file in the future. - --> - <description>The coding standard for Jaeger Client</description> - - <!-- Show sniff codes in all reports --> - <arg value="s"/> - - <!-- Use PSR-2 as a base --> - <rule ref="PSR2"/> - - <!-- Uncomment to use colors in progress or report --> - <!-- arg name="colors" / --> - - <!-- - If no files or directories are specified on the command line - your custom standard can specify what files should be checked - instead. - Note that specifying any file or directory path - on the command line will ignore all file tags. - --> - <file>src</file> - - <!-- - You can hard-code ignore patterns directly into your - custom standard so you don't have to specify the - patterns on the command line. - --> - <exclude-pattern>src/Jaeger/Thrift/*</exclude-pattern> -</ruleset> diff --git a/vendor/jonahgeorge/jaeger-client-php/phpunit.xml.dist b/vendor/jonahgeorge/jaeger-client-php/phpunit.xml.dist deleted file mode 100644 index d6795d99b..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/phpunit.xml.dist +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" - bootstrap="vendor/autoload.php" - colors="true" -> - <filter> - <whitelist> - <directory suffix=".php">src/Jaeger</directory> - <exclude> - <directory suffix="Interface.php">src/</directory> - <file>src/Jaeger/Constants.php</file> - <file>src/Jaeger/Thrift/Agent/AgentIf.php</file> - <file>src/Jaeger/Thrift/Agent/AggregationValidatorIf.php</file> - <file>src/Jaeger/Thrift/Agent/BaggageRestrictionManagerIf.php</file> - <file>src/Jaeger/Thrift/Agent/DependencyIf.php</file> - <file>src/Jaeger/Thrift/Agent/SamplingManagerIf.php</file> - <file>src/Jaeger/Thrift/CollectorIf.php</file> - <file>src/Jaeger/Thrift/Crossdock/TracedServiceIf.php</file> - </exclude> - </whitelist> - </filter> - - <testsuites> - <testsuite name="Jaeger Test Suite"> - <directory suffix=".php">tests/Jaeger</directory> - </testsuite> - </testsuites> - - <php> - <ini name="date.timezone" value="UTC"/> - <ini name="display_errors" value="on"/> - <ini name="display_startup_errors" value="on"/> - </php> - - <logging> - <log - type="coverage-text" - target="php://stdout" - lowUpperBound="60" - highLowerBound="90"/> - - <log - type="coverage-clover" - target="build/coverage.xml"/> - </logging> -</phpunit> diff --git a/vendor/jonahgeorge/jaeger-client-php/scripts/thrift-gen.sh b/vendor/jonahgeorge/jaeger-client-php/scripts/thrift-gen.sh deleted file mode 100644 index 7420f915f..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/scripts/thrift-gen.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -set -e - -cd "$(dirname "$0")/.." - -# checkout jaeger thrift files -rm -rf jaeger-idl -git clone https://github.com/jaegertracing/jaeger-idl - -# define thrift cmd -THRIFT="docker run -u $(id -u) -v '${PWD}:/data' thrift:0.11.0 thrift -o /data/jaeger-idl" -THRIFT_CMD="${THRIFT} --gen php:psr4,oop" - -# generate php files -FILES=$(find jaeger-idl/thrift -type f -name \*.thrift) -for f in ${FILES}; do - echo "${THRIFT_CMD} "/data/${f}"" - eval $THRIFT_CMD "/data/${f}" -done - -# move generated files -rm -rf src/Jaeger/Thrift -mv jaeger-idl/gen-php/Jaeger/Thrift src/Jaeger/Thrift - -# remove thrift files -rm -rf jaeger-idl diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/AgentClient/HttpAgentClient.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/AgentClient/HttpAgentClient.php deleted file mode 100644 index e270b76ac..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/AgentClient/HttpAgentClient.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -namespace Jaeger\AgentClient; - -class HttpAgentClient implements \Jaeger\Thrift\Agent\AgentIf -{ - protected $input_ = null; - protected $output_ = null; - - protected $seqid_ = 0; - - public function __construct($input, $output = null) - { - $this->input_ = $input; - $this->output_ = $output ? $output : $input; - } - - public function emitZipkinBatch(array $spans) - { - } - - public function emitBatch(\Jaeger\Thrift\Batch $batch) - { - $batch->write($this->output_); - $this->output_->getTransport()->flush(); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/BinaryCodec.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/BinaryCodec.php deleted file mode 100644 index 36c2ffe2c..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/BinaryCodec.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -namespace Jaeger\Codec; - -use Jaeger\SpanContext; -use OpenTracing\UnsupportedFormatException; - -class BinaryCodec implements CodecInterface -{ - /** - * {@inheritdoc} - * - * @see \Jaeger\Tracer::inject - * - * @param SpanContext $spanContext - * @param mixed $carrier - * - * @return void - */ - public function inject(SpanContext $spanContext, &$carrier) - { - throw new UnsupportedFormatException('Binary encoding not implemented'); - } - - /** - * {@inheritdoc} - * - * @see \Jaeger\Tracer::extract - * - * @param mixed $carrier - * @return SpanContext|null - * - * @throws UnsupportedFormatException - */ - public function extract($carrier) - { - throw new UnsupportedFormatException('Binary encoding not implemented'); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/CodecInterface.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/CodecInterface.php deleted file mode 100644 index 2aa7d690d..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/CodecInterface.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - -namespace Jaeger\Codec; - -use Jaeger\SpanContext; - -interface CodecInterface -{ - /** - * Handle the logic behind injecting propagation scheme specific information into the carrier - * (e.g. http request headers, amqp message headers, etc.). - * - * This method can modify the carrier. - * - * @see \Jaeger\Tracer::inject - * - * @param SpanContext $spanContext - * @param mixed $carrier - * - * @return void - */ - public function inject(SpanContext $spanContext, &$carrier); - - /** - * Handle the logic behind extracting propagation-scheme specific information from carrier - * (e.g. http request headers, amqp message headers, etc.). - * - * This method must not modify the carrier. - * - * @see \Jaeger\Tracer::extract - * - * @param mixed $carrier - * @return SpanContext|null - */ - public function extract($carrier); -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/CodecUtility.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/CodecUtility.php deleted file mode 100644 index eb86a1cde..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/CodecUtility.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -namespace Jaeger\Codec; - -class CodecUtility -{ - - /** - * Incoming trace/span IDs are hex representations of 64-bit values. PHP - * represents ints internally as signed 32- or 64-bit values, but base_convert - * converts to string representations of arbitrarily large positive numbers. - * This means at least half the incoming IDs will be larger than PHP_INT_MAX. - * - * Thrift, while building a binary representation of the IDs, performs bitwise - * operations on the string values, implicitly casting to int and capping them - * at PHP_INT_MAX. So, incoming IDs larger than PHP_INT_MAX will be serialized - * and sent to the agent as PHP_INT_MAX, breaking trace/span correlation. - * - * This method therefore, on 64-bit architectures, splits the hex string into - * high and low values, converts them separately to ints, and manually combines - * them into a proper signed int. This int is then handled properly by the - * Thrift package. - * - * On 32-bit architectures, it falls back to base_convert. - * - * @param string $hex - * @return string|int - */ - public static function hexToInt64($hex) - { - // If we're on a 32-bit architecture, fall back to base_convert. - if (PHP_INT_SIZE === 4) { - return base_convert($hex, 16, 10); - } - - $hi = intval(substr($hex, -16, -8), 16); - $lo = intval(substr($hex, -8, 8), 16); - - return $hi << 32 | $lo; - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/TextCodec.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/TextCodec.php deleted file mode 100644 index d437f3812..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/TextCodec.php +++ /dev/null @@ -1,184 +0,0 @@ -<?php - -namespace Jaeger\Codec; - -use Exception; -use Jaeger\SpanContext; - -use const Jaeger\TRACE_ID_HEADER; -use const Jaeger\BAGGAGE_HEADER_PREFIX; -use const Jaeger\DEBUG_ID_HEADER_KEY; - -class TextCodec implements CodecInterface -{ - private $urlEncoding; - private $traceIdHeader; - private $baggagePrefix; - private $debugIdHeader; - private $prefixLength; - - /** - * @param bool $urlEncoding - * @param string $traceIdHeader - * @param string $baggageHeaderPrefix - * @param string $debugIdHeader - */ - public function __construct( - bool $urlEncoding = false, - string $traceIdHeader = TRACE_ID_HEADER, - string $baggageHeaderPrefix = BAGGAGE_HEADER_PREFIX, - string $debugIdHeader = DEBUG_ID_HEADER_KEY - ) { - $this->urlEncoding = $urlEncoding; - $this->traceIdHeader = str_replace('_', '-', strtolower($traceIdHeader)); - $this->baggagePrefix = str_replace('_', '-', strtolower($baggageHeaderPrefix)); - $this->debugIdHeader = str_replace('_', '-', strtolower($debugIdHeader)); - $this->prefixLength = strlen($baggageHeaderPrefix); - } - - /** - * {@inheritdoc} - * - * @see \Jaeger\Tracer::inject - * - * @param SpanContext $spanContext - * @param mixed $carrier - * - * @return void - */ - public function inject(SpanContext $spanContext, &$carrier) - { - $carrier[$this->traceIdHeader] = $this->spanContextToString( - $spanContext->getTraceId(), - $spanContext->getSpanId(), - $spanContext->getParentId(), - $spanContext->getFlags() - ); - - $baggage = $spanContext->getBaggage(); - if (empty($baggage)) { - return; - } - - foreach ($baggage as $key => $value) { - $encodedValue = $value; - - if ($this->urlEncoding) { - $encodedValue = urlencode($value); - } - - $carrier[$this->baggagePrefix . $key] = $encodedValue; - } - } - - /** - * {@inheritdoc} - * - * @see \Jaeger\Tracer::extract - * - * @param mixed $carrier - * @return SpanContext|null - * - * @throws Exception - */ - public function extract($carrier) - { - $traceId = null; - $spanId = null; - $parentId = null; - $flags = null; - $baggage = null; - $debugId = null; - - foreach ($carrier as $key => $value) { - $ucKey = strtolower($key); - - if ($ucKey === $this->traceIdHeader) { - if ($this->urlEncoding) { - $value = urldecode($value); - } - list($traceId, $spanId, $parentId, $flags) = - $this->spanContextFromString($value); - } elseif ($this->startsWith($ucKey, $this->baggagePrefix)) { - if ($this->urlEncoding) { - $value = urldecode($value); - } - $attrKey = substr($key, $this->prefixLength); - if ($baggage === null) { - $baggage = [strtolower($attrKey) => $value]; - } else { - $baggage[strtolower($attrKey)] = $value; - } - } elseif ($ucKey === $this->debugIdHeader) { - if ($this->urlEncoding) { - $value = urldecode($value); - } - $debugId = $value; - } - } - - if ($traceId === null && $baggage !== null) { - throw new Exception('baggage without trace ctx'); - } - - if ($traceId === null) { - if ($debugId !== null) { - return new SpanContext(null, null, null, null, [], $debugId); - } - return null; - } - - return new SpanContext($traceId, $spanId, $parentId, $flags, $baggage); - } - - /** - * Store a span context to a string. - * - * @param int $traceId - * @param int $spanId - * @param int $parentId - * @param int $flags - * @return string - */ - private function spanContextToString($traceId, $spanId, $parentId, $flags) - { - $parentId = $parentId ?? 0; - return sprintf('%x:%x:%x:%x', $traceId, $spanId, $parentId, $flags); - } - - /** - * Create a span context from a string. - * - * @param string $value - * @return array - * - * @throws Exception - */ - private function spanContextFromString($value): array - { - $parts = explode(':', $value); - - if (count($parts) != 4) { - throw new Exception('Malformed tracer state string.'); - } - - return [ - CodecUtility::hexToInt64($parts[0]), - CodecUtility::hexToInt64($parts[1]), - CodecUtility::hexToInt64($parts[2]), - $parts[3], - ]; - } - - /** - * Checks that a string ($haystack) starts with a given prefix ($needle). - * - * @param string $haystack - * @param string $needle - * @return bool - */ - private function startsWith(string $haystack, string $needle): bool - { - return substr($haystack, 0, strlen($needle)) == $needle; - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/ZipkinCodec.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/ZipkinCodec.php deleted file mode 100644 index 1ea5d7c0b..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Codec/ZipkinCodec.php +++ /dev/null @@ -1,85 +0,0 @@ -<?php - -namespace Jaeger\Codec; - -use Jaeger\SpanContext; - -use const Jaeger\DEBUG_FLAG; -use const Jaeger\SAMPLED_FLAG; - -class ZipkinCodec implements CodecInterface -{ - const SAMPLED_NAME = 'X-B3-Sampled'; - const TRACE_ID_NAME = 'X-B3-TraceId'; - const SPAN_ID_NAME = 'X-B3-SpanId'; - const PARENT_ID_NAME = 'X-B3-ParentSpanId'; - const FLAGS_NAME = 'X-B3-Flags'; - - /** - * {@inheritdoc} - * - * @see \Jaeger\Tracer::inject - * - * @param SpanContext $spanContext - * @param mixed $carrier - * - * @return void - */ - public function inject(SpanContext $spanContext, &$carrier) - { - $carrier[self::TRACE_ID_NAME] = dechex($spanContext->getTraceId()); - $carrier[self::SPAN_ID_NAME] = dechex($spanContext->getSpanId()); - if ($spanContext->getParentId() != null) { - $carrier[self::PARENT_ID_NAME] = dechex($spanContext->getParentId()); - } - $carrier[self::FLAGS_NAME] = (int) $spanContext->getFlags(); - } - - /** - * {@inheritdoc} - * - * @see \Jaeger\Tracer::extract - * - * @param mixed $carrier - * @return SpanContext|null - */ - public function extract($carrier) - { - $traceId = "0"; - $spanId = "0"; - $parentId = "0"; - $flags = 0; - - if (isset($carrier[strtolower(self::SAMPLED_NAME)])) { - if ($carrier[strtolower(self::SAMPLED_NAME)] === "1" || - strtolower($carrier[strtolower(self::SAMPLED_NAME)] === "true") - ) { - $flags = $flags | SAMPLED_FLAG; - } - } - - if (isset($carrier[strtolower(self::TRACE_ID_NAME)])) { - $traceId = CodecUtility::hexToInt64($carrier[strtolower(self::TRACE_ID_NAME)], 16, 10); - } - - if (isset($carrier[strtolower(self::PARENT_ID_NAME)])) { - $parentId = CodecUtility::hexToInt64($carrier[strtolower(self::PARENT_ID_NAME)], 16, 10); - } - - if (isset($carrier[strtolower(self::SPAN_ID_NAME)])) { - $spanId = CodecUtility::hexToInt64($carrier[strtolower(self::SPAN_ID_NAME)], 16, 10); - } - - if (isset($carrier[strtolower(self::FLAGS_NAME)])) { - if ($carrier[strtolower(self::FLAGS_NAME)] === "1") { - $flags = $flags | DEBUG_FLAG; - } - } - - if ($traceId != "0" && $spanId != "0") { - return new SpanContext($traceId, $spanId, $parentId, $flags); - } - - return null; - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Config.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Config.php deleted file mode 100644 index 28fb972da..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Config.php +++ /dev/null @@ -1,390 +0,0 @@ -<?php - -namespace Jaeger; - -use Exception; -use Jaeger\Reporter\CompositeReporter; -use Jaeger\Reporter\LoggingReporter; -use Jaeger\Reporter\ReporterInterface; -use Jaeger\ReporterFactory\JaegerHttpReporterFactory; -use Jaeger\ReporterFactory\JaegerReporterFactory; -use Jaeger\ReporterFactory\ZipkinReporterFactory; -use Jaeger\Sampler\ConstSampler; -use Jaeger\Sampler\ProbabilisticSampler; -use Jaeger\Sampler\RateLimitingSampler; -use Jaeger\Sampler\SamplerInterface; -use Jaeger\Util\RateLimiter; -use OpenTracing\GlobalTracer; -use Psr\Cache\CacheItemPoolInterface; -use Psr\Log\LoggerInterface; -use Psr\Log\NullLogger; - -class Config -{ - const IP_VERSION = "ip_version"; - - const ZIPKIN_OVER_COMPACT_UDP = "zipkin_over_compact_udp"; - const JAEGER_OVER_BINARY_UDP = "jaeger_over_binary_udp"; - const JAEGER_OVER_BINARY_HTTP = "jaeger_over_binary_http"; - - const IPV6 = "IPv6"; - const IPV4 = "IPv4"; - - /** - * @return string[] - */ - public static function getAvailableDispatchModes() - { - return [self::ZIPKIN_OVER_COMPACT_UDP, self::JAEGER_OVER_BINARY_UDP, self::JAEGER_OVER_BINARY_HTTP]; - } - - /** - * @var array - */ - private $config; - - /** - * @var string - */ - private $serviceName; - - /** - * @var bool - */ - private $initialized = false; - - /** - * @var LoggerInterface - */ - private $logger; - - /** - * @return LoggerInterface - */ - public function getLogger() - { - return $this->logger; - } - - /** - * @var CacheItemPoolInterface - */ - private $cache; - - /** - * Config constructor. - * @param array $config - * @param string|null $serviceName - * @param LoggerInterface|null $logger - * @param CacheItemPoolInterface|null $cache - * @throws Exception - */ - public function __construct( - array $config, - string $serviceName = null, - LoggerInterface $logger = null, - CacheItemPoolInterface $cache = null - ) { - $this->config = $config; - - $this->setConfigFromEnv(); - - if (empty($this->config["dispatch_mode"])) { - $this->config["dispatch_mode"] = self::ZIPKIN_OVER_COMPACT_UDP; - } - - if (empty($this->config[Config::IP_VERSION])) { - $this->config[Config::IP_VERSION] = self::IPV4; - } - - $this->serviceName = $this->config['service_name'] ?? $serviceName; - - if ($this->serviceName === null) { - throw new Exception('service_name required in the config or param.'); - } - - $this->logger = $logger ?: new NullLogger(); - $this->cache = $cache; - } - - /** - * @return Tracer|null - * @throws Exception - */ - public function initializeTracer() - { - if ($this->initialized) { - $this->logger->warning('Jaeger tracer already initialized, skipping'); - return null; - } - - $reporter = $this->getReporter(); - $sampler = $this->getSampler(); - - - $tracer = $this->createTracer($reporter, $sampler); - - $this->initializeGlobalTracer($tracer); - - return $tracer; - } - - /** - * @param ReporterInterface $reporter - * @param SamplerInterface $sampler - * @return Tracer - */ - public function createTracer(ReporterInterface $reporter, SamplerInterface $sampler): Tracer - { - return new Tracer( - $this->serviceName, - $reporter, - $sampler, - $this->shouldUseOneSpanPerRpc(), - $this->logger, - null, - $this->getTraceIdHeader(), - $this->getBaggageHeaderPrefix(), - $this->getDebugIdHeaderKey(), - $this->getConfiguredTags() - ); - } - - /** - * @return string - */ - public function getServiceName(): string - { - return $this->serviceName; - } - - /** - * @param Tracer $tracer - */ - private function initializeGlobalTracer(Tracer $tracer) - { - GlobalTracer::set($tracer); - $this->logger->debug('OpenTracing\GlobalTracer initialized to ' . $tracer->getServiceName()); - } - - /** - * @return bool - */ - private function getLogging(): bool - { - return (bool)($this->config['logging'] ?? false); - } - - /** - * @return ReporterInterface - */ - private function getReporter(): ReporterInterface - { - switch ($this->config["dispatch_mode"]) { - case self::JAEGER_OVER_BINARY_UDP: - $reporter = (new JaegerReporterFactory($this))->createReporter(); - break; - case self::ZIPKIN_OVER_COMPACT_UDP: - $reporter = (new ZipkinReporterFactory($this))->createReporter(); - break; - case self::JAEGER_OVER_BINARY_HTTP: - $reporter = (new JaegerHttpReporterFactory($this))->createReporter(); - break; - default: - throw new \RuntimeException( - sprintf( - "Unsupported `dispatch_mode` value: %s. Allowed values are: %s", - $this->config["dispatch_mode"], - implode(", ", Config::getAvailableDispatchModes()) - ) - ); - } - - if ($this->getLogging()) { - $reporter = new CompositeReporter($reporter, new LoggingReporter($this->logger)); - } - - return $reporter; - } - - /** - * @return SamplerInterface - * @throws \Psr\Cache\InvalidArgumentException - * @throws Exception - */ - private function getSampler(): SamplerInterface - { - $samplerConfig = $this->config['sampler'] ?? []; - $samplerType = $samplerConfig['type'] ?? null; - $samplerParam = $samplerConfig['param'] ?? null; - - if ($samplerType === null || $samplerType === SAMPLER_TYPE_REMOTE) { - // todo: implement remote sampling - return new ProbabilisticSampler((float)$samplerParam); - } elseif ($samplerType === SAMPLER_TYPE_CONST) { - return new ConstSampler($samplerParam ?? false); - } elseif ($samplerType === SAMPLER_TYPE_PROBABILISTIC) { - return new ProbabilisticSampler((float)$samplerParam); - } elseif ($samplerType === SAMPLER_TYPE_RATE_LIMITING) { - if (!$this->cache) { - throw new Exception('You cannot use RateLimitingSampler without cache component'); - } - $cacheConfig = $samplerConfig['cache'] ?? []; - return new RateLimitingSampler( - $samplerParam ?? 0, - new RateLimiter( - $this->cache, - $cacheConfig['currentBalanceKey'] ?? 'rate.currentBalance', - $cacheConfig['lastTickKey'] ?? 'rate.lastTick' - ) - ); - } - throw new Exception('Unknown sampler type ' . $samplerType); - } - - /** - * The UDP max buffer length. - * - * @return int - */ - public function getMaxBufferLength(): int - { - return (int)($this->config['max_buffer_length'] ?? 64000); - } - - /** - * @return string - */ - public function getLocalAgentReportingHost(): string - { - return $this->getLocalAgentGroup()['reporting_host'] ?? DEFAULT_REPORTING_HOST; - } - - /** - * @return int - */ - public function getLocalAgentReportingPort(): int - { - $port = $this->getLocalAgentGroup()['reporting_port'] ?? null; - if (empty($this->getLocalAgentGroup()['reporting_port'])) { - switch ($this->config['dispatch_mode']) { - case self::JAEGER_OVER_BINARY_UDP: - $port = DEFAULT_JAEGER_UDP_BINARY_REPORTING_PORT; - break; - case self::JAEGER_OVER_BINARY_HTTP: - $port = DEFAULT_JAEGER_HTTP_BINARY_REPORTING_PORT; - break; - default: - $port = DEFAULT_ZIPKIN_UDP_COMPACT_REPORTING_PORT; - } - } - return (int)$port; - } - - /** - * @return array - */ - private function getLocalAgentGroup(): array - { - return $this->config['local_agent'] ?? []; - } - - /** - * @return string - */ - private function getTraceIdHeader(): string - { - return $this->config['trace_id_header'] ?? TRACE_ID_HEADER; - } - - /** - * @return string - */ - private function getBaggageHeaderPrefix(): string - { - return $this->config['baggage_header_prefix'] ?? BAGGAGE_HEADER_PREFIX; - } - - /** - * @return string - */ - private function getDebugIdHeaderKey(): string - { - return $this->config['debug_id_header_key'] ?? DEBUG_ID_HEADER_KEY; - } - - /** - * Get a list of user-defined tags to be added to each span created by the tracer initialized by this config. - * @return string[] - */ - private function getConfiguredTags(): array - { - return $this->config['tags'] ?? []; - } - - /** - * Whether to follow the Zipkin model of using one span per RPC, - * as opposed to the model of using separate spans on the RPC client and server. - * Defaults to true. - * - * @return bool - */ - private function shouldUseOneSpanPerRpc(): bool - { - return $this->config['one_span_per_rpc'] ?? true; - } - - public function ipProtocolVersion(): string - { - return $this->config[self::IP_VERSION] ?? self::IPV4; - } - - /** - * Sets values from env vars into config props, unless ones has been already set. - */ - private function setConfigFromEnv() - { - // general - if (isset($_ENV['JAEGER_SERVICE_NAME']) && !isset($this->config['service_name'])) { - $this->config['service_name'] = $_ENV['JAEGER_SERVICE_NAME']; - } - - if (isset($_ENV['JAEGER_TAGS']) && !isset($this->config["tags"])) { - $this->config['tags'] = $_ENV['JAEGER_TAGS']; - } - - if (isset($_ENV['JAEGER_DISPATCH_MODE']) && !isset($this->config['dispatch_mode'])) { - $this->config['dispatch_mode'] = $_ENV['JAEGER_DISPATCH_MODE']; - } - - // reporting - if (isset($_ENV['JAEGER_AGENT_HOST']) && !isset($this->config['local_agent']['reporting_host'])) { - $this->config['local_agent']['reporting_host'] = $_ENV['JAEGER_AGENT_HOST']; - } - - if (isset($_ENV['JAEGER_AGENT_PORT']) && !isset($this->config['local_agent']['reporting_port'])) { - $this->config['local_agent']['reporting_port'] = intval($_ENV['JAEGER_AGENT_PORT']); - } - - if (isset($_ENV['JAEGER_REPORTER_LOG_SPANS']) && !isset($this->config['logging'])) { - $this->config['logging'] = filter_var($_ENV['JAEGER_REPORTER_LOG_SPANS'], FILTER_VALIDATE_BOOLEAN); - } - - if (isset($_ENV['JAEGER_REPORTER_MAX_QUEUE_SIZE']) && !isset($this->config['max_buffer_length'])) { - $this->config['max_buffer_length'] = intval($_ENV['JAEGER_REPORTER_MAX_QUEUE_SIZE']); - } - - // sampling - if (isset($_ENV['JAEGER_SAMPLER_TYPE']) && !isset($this->config['sampler']['type'])) { - $this->config['sampler']['type'] = $_ENV['JAEGER_SAMPLER_TYPE']; - } - - if (isset($_ENV['JAEGER_SAMPLER_PARAM']) && !isset($this->config['sampler']['param'])) { - $this->config['sampler']['param'] = $_ENV['JAEGER_SAMPLER_PARAM']; - } - - if (isset($_ENV['IP_VERSION']) && !isset($this->config[Config::IP_VERSION])) { - $this->config[Config::IP_VERSION] = $_ENV['IP_VERSION']; - } - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Constants.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Constants.php deleted file mode 100644 index 1e4be65f5..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Constants.php +++ /dev/null @@ -1,100 +0,0 @@ -<?php - -namespace Jaeger; - -// Max number of bits to use when generating random ID -const MAX_ID_BITS = 64; - -// How often remotely controller sampler polls for sampling strategy -const DEFAULT_SAMPLING_INTERVAL = 60; - -// How often remote reporter does a preemptive flush of its buffers -const DEFAULT_FLUSH_INTERVAL = 1; - -// Name of the HTTP header used to encode trace ID -const TRACE_ID_HEADER = 'uber-trace-id'; - -// Prefix for HTTP headers used to record baggage items -const BAGGAGE_HEADER_PREFIX = 'uberctx-'; - -// The name of HTTP header or a TextMap carrier key which, if found in the -// carrier, forces the trace to be sampled as "debug" trace. The value of the -// header is recorded as the tag on the # root span, so that the trace can -// be found in the UI using this value as a correlation ID. -const DEBUG_ID_HEADER_KEY = 'jaeger-debug-id'; - -const JAEGER_CLIENT_VERSION = 'PHP-' . PHP_VERSION; - -// Tracer-scoped tag that tells the version of Jaeger client library -const JAEGER_VERSION_TAG_KEY = 'jaeger.version'; - -// Tracer-scoped tag that contains the hostname -const JAEGER_HOSTNAME_TAG_KEY = 'jaeger.hostname'; - -const SAMPLER_TYPE_TAG_KEY = 'sampler.type'; - -const SAMPLER_PARAM_TAG_KEY = 'sampler.param'; - -const DEFAULT_SAMPLING_PROBABILITY = 0.001; - -const DEFAULT_LOWER_BOUND = 1.0 / (10.0 * 60.0); # sample once every 10 minutes - -const DEFAULT_MAX_OPERATIONS = 2000; - -const STRATEGIES_STR = 'perOperationStrategies'; - -const OPERATION_STR = 'operation'; - -const DEFAULT_LOWER_BOUND_STR = 'defaultLowerBoundTracesPerSecond'; - -const PROBABILISTIC_SAMPLING_STR = 'probabilisticSampling'; - -const SAMPLING_RATE_STR = 'samplingRate'; - -const DEFAULT_SAMPLING_PROBABILITY_STR = 'defaultSamplingProbability'; - -const OPERATION_SAMPLING_STR = 'operationSampling'; - -const MAX_TRACES_PER_SECOND_STR = 'maxTracesPerSecond'; - -const RATE_LIMITING_SAMPLING_STR = 'rateLimitingSampling'; - -const STRATEGY_TYPE_STR = 'strategyType'; - -// the type of sampler that always makes the same decision. -const SAMPLER_TYPE_CONST = 'const'; - -// the type of sampler that polls Jaeger agent for sampling strategy. -const SAMPLER_TYPE_REMOTE = 'remote'; - -// the type of sampler that samples traces with a certain fixed probability. -const SAMPLER_TYPE_PROBABILISTIC = 'probabilistic'; - -// the type of sampler that samples only up to a fixed number -// of traces per second. -// noinspection SpellCheckingInspection -const SAMPLER_TYPE_RATE_LIMITING = 'ratelimiting'; - -// the type of sampler that samples only up to a fixed number -// of traces per second. -// noinspection SpellCheckingInspection -const SAMPLER_TYPE_LOWER_BOUND = 'lowerbound'; - -const DEFAULT_REPORTING_HOST = 'localhost'; - -/** @deprecated */ -const DEFAULT_REPORTING_PORT = 5775; - -const DEFAULT_ZIPKIN_UDP_COMPACT_REPORTING_PORT = 5775; -const DEFAULT_JAEGER_UDP_BINARY_REPORTING_PORT = 6832; -const DEFAULT_JAEGER_HTTP_BINARY_REPORTING_PORT = 14268; - -const DEFAULT_SAMPLING_PORT = 5778; - -const LOCAL_AGENT_DEFAULT_ENABLED = true; - -const ZIPKIN_SPAN_FORMAT = 'zipkin-span-format'; - -const SAMPLED_FLAG = 0x01; - -const DEBUG_FLAG = 0x02; diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Mapper/SpanToJaegerMapper.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Mapper/SpanToJaegerMapper.php deleted file mode 100644 index da5871904..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Mapper/SpanToJaegerMapper.php +++ /dev/null @@ -1,171 +0,0 @@ -<?php - -namespace Jaeger\Mapper; - -use Jaeger\Span; -use Jaeger\Thrift\Agent\Zipkin\AnnotationType; -use Jaeger\Thrift\Agent\Zipkin\BinaryAnnotation; -use Jaeger\Thrift\Log; -use Jaeger\Thrift\Span as JaegerThriftSpan; -use Jaeger\Thrift\Tag; -use Jaeger\Thrift\TagType; -use const OpenTracing\Tags\COMPONENT; -use const OpenTracing\Tags\PEER_HOST_IPV4; -use const OpenTracing\Tags\PEER_PORT; -use const OpenTracing\Tags\PEER_SERVICE; -use const OpenTracing\Tags\SPAN_KIND; - -class SpanToJaegerMapper -{ - private $specialSpanTags = ["jaeger.hostname", "jaeger.version"]; - - private $processTagsPrefix = "process."; - - /** - * @return string[] - */ - public function getSpecialSpanTags(): array - { - return $this->specialSpanTags; - } - - /** - * @return string - */ - public function getProcessTagsPrefix(): string - { - return $this->processTagsPrefix; - } - - public function mapSpanToJaeger(Span $span) : JaegerThriftSpan - { - $timestamp = $span->getStartTime(); - $duration = $span->getEndTime() - $span->getStartTime(); - - /** @var Tag[] $tags */ - $tags = []; - - $tags[] = new Tag([ - "key" => COMPONENT, - "vType" => TagType::STRING, - "vStr" => $span->getComponent() ?? $span->getTracer()->getServiceName(), - ]); - - // Handle special tags - $peerService = $span->peer['service_name'] ?? null; - if ($peerService !== null) { - $tags[] = new Tag([ - "key" => PEER_SERVICE, - "vType" => TagType::STRING, - "vStr" => $peerService, - ]); - } - - $peerHostIpv4 = $span->peer['ipv4'] ?? null; - if ($peerHostIpv4 !== null) { - $tags[] = new Tag([ - "key" => PEER_HOST_IPV4, - "vType" => TagType::STRING, - "vStr" => $peerHostIpv4, - ]); - } - - $peerPort = $span->peer['port'] ?? null; - if ($peerPort !== null) { - $tags[] = new Tag([ - "key" => PEER_PORT, - "vType" => TagType::LONG, - "vLong" => $peerPort, - ]); - } - - $spanKind = $span->getKind(); - if ($spanKind !== null) { - $tags[] = new Tag([ - "key" => SPAN_KIND, - "vType" => TagType::STRING, - "vStr" => $spanKind, - ]); - } - - /** @var BinaryAnnotation[] $binaryAnnotationTags */ - $binaryAnnotationTags = $span->getTags(); - foreach ($binaryAnnotationTags as $binaryAnnotationTag) { - if (in_array($binaryAnnotationTag->key, $this->specialSpanTags, true)) { - continue ; - } - - if (strpos($binaryAnnotationTag->key, $this->processTagsPrefix) === 0) { - continue; - } - - $type = ""; - $vkey = ""; - switch ($binaryAnnotationTag->annotation_type) { - case AnnotationType::BOOL: - $type = TagType::BOOL; - $vkey = "vBool"; - break; - case AnnotationType::BYTES: - $type = TagType::BINARY; - $vkey = "vBinary"; - break; - case AnnotationType::DOUBLE: - $type = TagType::DOUBLE; - $vkey = "vDouble"; - break; - case AnnotationType::I16: - case AnnotationType::I32: - case AnnotationType::I64: - $type = TagType::LONG; - $vkey = "vLong"; - break; - default: - $type = TagType::STRING; - $vkey = "vStr"; - } - - $tags[] = new Tag([ - "key" => $binaryAnnotationTag->key, - "vType" => $type, - $vkey => $binaryAnnotationTag->value, - ]); - } - - /** @var Log[] $logs */ - $logs = []; - - $spanLogs = $span->getLogs(); - - foreach ($spanLogs as $spanLog) { - /** @var Tag $fields */ - $fields = []; - - if (!empty($spanLog["fields"])) { - $fields[] = new Tag([ - "key" => "event", - "vType" => TagType::STRING, - "vStr" => json_encode($spanLog["fields"]) - ]); - } - - $logs[] = new Log([ - "timestamp" => $spanLog["timestamp"], - "fields" => $fields - ]); - } - - return new JaegerThriftSpan([ - "traceIdLow" => (int)$span->getContext()->getTraceId(), - "traceIdHigh" => 0, - "spanId" => (int)$span->getContext()->getSpanId(), - "parentSpanId" => (int)$span->getContext()->getParentId(), - "operationName" => $span->getOperationName(), - "startTime" => $timestamp, - "duration" => $duration, - "flags" => (int)$span->isDebug(), - "tags" => $tags, - "logs" => $logs - ]); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/CompositeReporter.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/CompositeReporter.php deleted file mode 100644 index 78533cc76..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/CompositeReporter.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php - -namespace Jaeger\Reporter; - -use Jaeger\Span; - -/** - * CompositeReporter delegates reporting to one or more underlying reporters. - */ -class CompositeReporter implements ReporterInterface -{ - /** - * @var ReporterInterface[] - */ - private $reporters; - - /** - * CompositeReporter constructor. - * - * @param ReporterInterface ...$reporters - */ - public function __construct(ReporterInterface ...$reporters) - { - $this->reporters = $reporters; - } - - /** - * {@inheritdoc} - * - * @param Span $span - * @return void - */ - public function reportSpan(Span $span) - { - foreach ($this->reporters as $reporter) { - $reporter->reportSpan($span); - } - } - - /** - * {@inheritdoc} - * - * @return void - */ - public function close() - { - foreach ($this->reporters as $reporter) { - $reporter->close(); - } - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/InMemoryReporter.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/InMemoryReporter.php deleted file mode 100644 index 8aabe2ee8..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/InMemoryReporter.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php - -namespace Jaeger\Reporter; - -use Jaeger\Span; - -/** - * InMemoryReporter stores spans in memory and returns them via getSpans(). - */ -class InMemoryReporter implements ReporterInterface -{ - /** - * @var Span[] - */ - private $spans = []; - - /** - * {@inheritdoc} - * - * @param Span $span - * @return void - */ - public function reportSpan(Span $span) - { - $this->spans[] = $span; - } - - /** - * @return Span[] - */ - public function getSpans(): array - { - return $this->spans; - } - - /** - * {@inheritdoc} - * - * Only implemented to satisfy the sampler interface. - * - * @return void - */ - public function close() - { - // nothing to do - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/JaegerReporter.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/JaegerReporter.php deleted file mode 100644 index 999d69e0a..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/JaegerReporter.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php - -namespace Jaeger\Reporter; - -use Jaeger\Sender\SenderInterface; -use Jaeger\Span; - -class JaegerReporter implements ReporterInterface -{ - /** - * @var SenderInterface - */ - private $sender; - - /** - * RemoteReporter constructor. - * - * @param SenderInterface $sender - */ - public function __construct(SenderInterface $sender) - { - $this->sender = $sender; - } - - public function reportSpan(Span $span) - { - $this->sender->append($span); - } - - public function close() - { - $this->sender->flush(); - $this->sender->close(); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/LoggingReporter.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/LoggingReporter.php deleted file mode 100644 index 264ea94c5..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/LoggingReporter.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php - -namespace Jaeger\Reporter; - -use Jaeger\Span; -use Psr\Log\LoggerInterface; -use Psr\Log\NullLogger; - -/** - * LoggingReporter logs all spans. - */ -class LoggingReporter implements ReporterInterface -{ - /** - * @var LoggerInterface - */ - private $logger; - - /** - * LoggingReporter constructor. - * - * @param LoggerInterface|null $logger - */ - public function __construct(LoggerInterface $logger = null) - { - $this->logger = $logger ?? new NullLogger(); - } - - /** - * {@inheritdoc} - * - * @param Span $span - * @return void - */ - public function reportSpan(Span $span) - { - $this->logger->debug('Reporting span ' . $span->getOperationName()); - } - - /** - * {@inheritdoc} - * - * Only implemented to satisfy the sampler interface. - * - * @return void - */ - public function close() - { - // nothing to do - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/NullReporter.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/NullReporter.php deleted file mode 100644 index 84a953bef..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/NullReporter.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - -namespace Jaeger\Reporter; - -use Jaeger\Span; - -/** - * NullReporter ignores all spans. - */ -class NullReporter implements ReporterInterface -{ - /** - * {@inheritdoc} - * - * @param Span $span - * @return void - */ - public function reportSpan(Span $span) - { - // nothing to do - } - - /** - * {@inheritdoc} - * - * @return void - */ - public function close() - { - // nothing to do - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/RemoteReporter.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/RemoteReporter.php deleted file mode 100644 index 9b78aa3d1..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/RemoteReporter.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -namespace Jaeger\Reporter; - -use Jaeger\Sender\UdpSender; -use Jaeger\Span; - -class RemoteReporter implements ReporterInterface -{ - /** - * @var UdpSender - */ - private $transport; - - /** - * RemoteReporter constructor. - * - * @param UdpSender $transport - */ - public function __construct(UdpSender $transport) - { - $this->transport = $transport; - } - - /** - * {@inheritdoc} - * - * @param Span $span - * @return void - */ - public function reportSpan(Span $span) - { - $this->transport->append($span); - } - - /** - * {@inheritdoc} - * - * @return void - */ - public function close() - { - $this->transport->flush(); - $this->transport->close(); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/ReporterInterface.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/ReporterInterface.php deleted file mode 100644 index fea8a8713..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Reporter/ReporterInterface.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php - -namespace Jaeger\Reporter; - -use Jaeger\Span; - -/** - * Uses to report finished span to something that collects those spans. - * - * @package Jaeger\Reporter - */ -interface ReporterInterface -{ - /** - * Report finished span. - * - * @param Span $span - * @return void - */ - public function reportSpan(Span $span); - - /** - * Release any resources used by the reporter and flushes/sends the data. - * - * @return void - */ - public function close(); -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/AbstractReporterFactory.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/AbstractReporterFactory.php deleted file mode 100644 index e34adc5dc..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/AbstractReporterFactory.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php - -namespace Jaeger\ReporterFactory; - -use Jaeger\Config; -use Thrift\Transport\TTransport; - -abstract class AbstractReporterFactory implements ReporterFactoryInterface -{ - /** - * @var Config - */ - protected $config; - - /** - * AbstractReporterFactory constructor. - * @param Config $config - */ - public function __construct($config) - { - $this->config = $config; - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/JaegerHttpReporterFactory.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/JaegerHttpReporterFactory.php deleted file mode 100644 index 038e81161..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/JaegerHttpReporterFactory.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php - -namespace Jaeger\ReporterFactory; - -use Jaeger\AgentClient\HttpAgentClient; -use Jaeger\Reporter\JaegerReporter; -use Jaeger\Reporter\ReporterInterface; -use Jaeger\Sender\JaegerSender; -use Thrift\Exception\TTransportException; -use Thrift\Protocol\TBinaryProtocol; -use Thrift\Transport\THttpClient; - -class JaegerHttpReporterFactory extends AbstractReporterFactory implements ReporterFactoryInterface -{ - public function createReporter() : ReporterInterface - { - $transport = new THttpClient( - $this->config->getLocalAgentReportingHost(), - $this->config->getLocalAgentReportingPort(), - "/api/traces" - ); - - try { - $transport->open(); - } catch (TTransportException $e) { - $this->config->getLogger()->warning($e->getMessage()); - } - $protocol = new TBinaryProtocol($transport); - $client = new HttpAgentClient($protocol); - $this->config->getLogger()->debug('Initializing HTTP Jaeger Tracer with Jaeger.Thrift over Binary protocol'); - $sender = new JaegerSender($client, $this->config->getLogger()); - $sender->setMaxBufferLength($this->config->getMaxBufferLength()); - return new JaegerReporter($sender); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/JaegerReporterFactory.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/JaegerReporterFactory.php deleted file mode 100644 index 9865884b5..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/JaegerReporterFactory.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php - -namespace Jaeger\ReporterFactory; - -use Jaeger\AgentClient\HttpAgentClient; -use Jaeger\Reporter\JaegerReporter; -use Jaeger\Reporter\ReporterInterface; -use Jaeger\Sender\JaegerSender; -use Jaeger\Thrift\Agent\AgentClient; -use Jaeger\ThriftUdpTransport; -use Thrift\Exception\TTransportException; -use Thrift\Protocol\TBinaryProtocol; -use Thrift\Transport\TBufferedTransport; - -class JaegerReporterFactory extends AbstractReporterFactory implements ReporterFactoryInterface -{ - public function createReporter() : ReporterInterface - { - $udp = new ThriftUdpTransport( - $this->config->getLocalAgentReportingHost(), - $this->config->getLocalAgentReportingPort(), - $this->config->getLogger(), - $this->config - ); - - $transport = new TBufferedTransport( - $udp, - $this->config->getMaxBufferLength(), - $this->config->getMaxBufferLength() - ); - - try { - $transport->open(); - } catch (TTransportException $e) { - $this->config->getLogger()->warning($e->getMessage()); - } - $protocol = new TBinaryProtocol($transport); - $client = new AgentClient($protocol); - $this->config->getLogger()->debug('Initializing UDP Jaeger Tracer with Jaeger.Thrift over Binary protocol'); - $sender = new JaegerSender($client, $this->config->getLogger()); - $sender->setMaxBufferLength($this->config->getMaxBufferLength()); - return new JaegerReporter($sender); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/ReporterFactoryInterface.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/ReporterFactoryInterface.php deleted file mode 100644 index 4bfd3204f..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/ReporterFactoryInterface.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php - -namespace Jaeger\ReporterFactory; - -use Jaeger\Reporter\ReporterInterface; - -interface ReporterFactoryInterface -{ - public function createReporter() : ReporterInterface; -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/ZipkinReporterFactory.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/ZipkinReporterFactory.php deleted file mode 100644 index 736977b4d..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/ZipkinReporterFactory.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -namespace Jaeger\ReporterFactory; - -use Jaeger\Reporter\JaegerReporter; -use Jaeger\Reporter\RemoteReporter; -use Jaeger\Reporter\ReporterInterface; -use Jaeger\Sender\JaegerSender; -use Jaeger\Sender\UdpSender; -use Jaeger\Thrift\Agent\AgentClient; -use Jaeger\ThriftUdpTransport; -use Thrift\Exception\TTransportException; -use Thrift\Protocol\TBinaryProtocol; -use Thrift\Protocol\TCompactProtocol; -use Thrift\Transport\TBufferedTransport; -use Thrift\Transport\TTransport; - -class ZipkinReporterFactory extends AbstractReporterFactory implements ReporterFactoryInterface -{ - public function createReporter() : ReporterInterface - { - $udp = new ThriftUdpTransport( - $this->config->getLocalAgentReportingHost(), - $this->config->getLocalAgentReportingPort(), - $this->config->getLogger(), - $this->config - ); - - $transport = new TBufferedTransport( - $udp, - $this->config->getMaxBufferLength(), - $this->config->getMaxBufferLength() - ); - - try { - $transport->open(); - } catch (TTransportException $e) { - $this->config->getLogger()->warning($e->getMessage()); - } - $protocol = new TCompactProtocol($transport); - $client = new AgentClient($protocol); - $this->config->getLogger()->debug('Initializing UDP Jaeger Tracer with Zipkin.Thrift over Compact protocol'); - $sender = new UdpSender($client, $this->config->getMaxBufferLength(), $this->config->getLogger()); - return new RemoteReporter($sender); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/ConstSampler.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/ConstSampler.php deleted file mode 100644 index 7c6ba3d62..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/ConstSampler.php +++ /dev/null @@ -1,68 +0,0 @@ -<?php - -namespace Jaeger\Sampler; - -use const Jaeger\SAMPLER_PARAM_TAG_KEY; -use const Jaeger\SAMPLER_TYPE_CONST; -use const Jaeger\SAMPLER_TYPE_TAG_KEY; - -/** - * ConstSampler always returns the same decision. - * - * @package Jaeger\Sampler - */ -class ConstSampler implements SamplerInterface -{ - /** - * Whether or not the new trace should be sampled. - * - * @var bool - */ - private $decision; - - /** - * A list of the sampler tags. - * - * @var array - */ - private $tags = []; - - /** - * ConstSampler constructor. - * - * @param bool $decision - */ - public function __construct(bool $decision = true) - { - $this->tags = [ - SAMPLER_TYPE_TAG_KEY => SAMPLER_TYPE_CONST, - SAMPLER_PARAM_TAG_KEY => $decision, - ]; - - $this->decision = $decision; - } - - /** - * {@inheritdoc} - * - * @param string $traceId The traceId on the span. - * @param string $operation The operation name set on the span. - * @return array - */ - public function isSampled(string $traceId, string $operation = ''): array - { - return [$this->decision, $this->tags]; - } - - /** - * {@inheritdoc} - * - * Only implemented to satisfy the sampler interface. - * - * @return void - */ - public function close() - { - // nothing to do - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/ProbabilisticSampler.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/ProbabilisticSampler.php deleted file mode 100644 index cb265d01e..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/ProbabilisticSampler.php +++ /dev/null @@ -1,88 +0,0 @@ -<?php - -namespace Jaeger\Sampler; - -use OutOfBoundsException; -use const Jaeger\SAMPLER_PARAM_TAG_KEY; -use const Jaeger\SAMPLER_TYPE_PROBABILISTIC; -use const Jaeger\SAMPLER_TYPE_TAG_KEY; - -/** - * A sampler that randomly samples a certain percentage of traces specified - * by the samplingRate, in the range between 0.0 and 1.0. - * - * @package Jaeger\Sampler - */ -class ProbabilisticSampler implements SamplerInterface -{ - /** - * The sampling rate rate between 0.0 and 1.0. - * - * @var float - */ - private $rate; - - /** - * A list of the sampler tags. - * - * @var array - */ - private $tags = []; - - /** - * The boundary of the sample sampling rate. - * - * @var float - */ - private $boundary; - - /** - * ProbabilisticSampler constructor. - * - * @param float $rate - * @throws OutOfBoundsException - */ - public function __construct(float $rate) - { - $this->tags = [ - SAMPLER_TYPE_TAG_KEY => SAMPLER_TYPE_PROBABILISTIC, - SAMPLER_PARAM_TAG_KEY => $rate, - ]; - - if ($rate < 0.0 || $rate > 1.0) { - throw new OutOfBoundsException('Sampling rate must be between 0.0 and 1.0.'); - } - - $this->rate = $rate; - if ($rate < 0.5) { - $this->boundary = (int)($rate * PHP_INT_MAX); - } else { - // more precise calculation due to int and float having different precision near PHP_INT_MAX - $this->boundary = PHP_INT_MAX - (int)((1 - $rate) * PHP_INT_MAX); - } - } - - /** - * {@inheritdoc} - * - * @param string $traceId The traceId on the span. - * @param string $operation The operation name set on the span. - * @return array - */ - public function isSampled(string $traceId, string $operation = ''): array - { - return [($traceId < $this->boundary), $this->tags]; - } - - /** - * {@inheritdoc} - * - * Only implemented to satisfy the sampler interface. - * - * @return void - */ - public function close() - { - // nothing to do - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/RateLimitingSampler.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/RateLimitingSampler.php deleted file mode 100644 index d0ea0f180..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/RateLimitingSampler.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php - -namespace Jaeger\Sampler; - -use Jaeger\Util\RateLimiter; - -use const Jaeger\SAMPLER_PARAM_TAG_KEY; -use const Jaeger\SAMPLER_TYPE_RATE_LIMITING; -use const Jaeger\SAMPLER_TYPE_TAG_KEY; - -class RateLimitingSampler implements SamplerInterface -{ - /** - * @var RateLimiter - */ - private $rateLimiter; - - /** - * A list of the sampler tags. - * - * @var array - */ - private $tags = []; - - public function __construct($maxTracesPerSecond, RateLimiter $rateLimiter) - { - $this->tags = [ - SAMPLER_TYPE_TAG_KEY => SAMPLER_TYPE_RATE_LIMITING, - SAMPLER_PARAM_TAG_KEY => $maxTracesPerSecond, - ]; - - $maxTracesPerNanosecond = $maxTracesPerSecond / 1000000000.0; - $this->rateLimiter = $rateLimiter; - $this->rateLimiter->initialize($maxTracesPerNanosecond, $maxTracesPerSecond > 1.0 ? 1.0 : $maxTracesPerSecond); - } - - /** - * Whether or not the new trace should be sampled. - * - * Implementations should return an array in the format [$decision, $tags]. - * - * @param string $traceId The traceId on the span. - * @param string $operation The operation name set on the span. - * @return array - */ - public function isSampled(string $traceId = '', string $operation = '') - { - return [$this->rateLimiter->checkCredit(1.0), $this->tags]; - } - - /** - * {@inheritdoc} - * - * Only implemented to satisfy the sampler interface. - * - * @return void - */ - public function close() - { - // nothing to do - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/SamplerInterface.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/SamplerInterface.php deleted file mode 100644 index b6d44e783..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/SamplerInterface.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php - -namespace Jaeger\Sampler; - -/** - * Sampler is responsible for deciding if a new trace should be sampled and captured for storage. - * - * @package Jaeger\Sampler - */ -interface SamplerInterface -{ - /** - * Whether or not the new trace should be sampled. - * - * Implementations should return an array in the format [$decision, $tags]. - * - * @param string $traceId The traceId on the span. - * @param string $operation The operation name set on the span. - * @return array - */ - public function isSampled(string $traceId, string $operation); - - /** - * Release any resources used by the sampler. - * - * @return void - */ - public function close(); -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Scope.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Scope.php deleted file mode 100644 index 86511bae0..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Scope.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php - -namespace Jaeger; - -use OpenTracing\Scope as OTScope; -use OpenTracing\Span as OTSpan; - -/** - * {@inheritdoc} - */ -class Scope implements OTScope -{ - /** - * @var ScopeManager - */ - private $scopeManager; - - /** - * @var OTSpan - */ - private $wrapped; - - /** - * @var OTScope|null - */ - private $toRestore; - - /** - * @var bool - */ - private $finishSpanOnClose; - - /** - * Scope constructor. - * @param ScopeManager $scopeManager - * @param OTSpan $wrapped - * @param bool $finishSpanOnClose - */ - public function __construct(ScopeManager $scopeManager, OTSpan $wrapped, bool $finishSpanOnClose) - { - $this->scopeManager = $scopeManager; - $this->wrapped = $wrapped; - $this->finishSpanOnClose = $finishSpanOnClose; - $this->toRestore = $scopeManager->getActive(); - } - - /** - * {@inheritdoc} - */ - public function close(): void - { - if ($this->scopeManager->getActive() !== $this) { - // This shouldn't happen if users call methods in expected order - return; - } - - if ($this->finishSpanOnClose) { - $this->wrapped->finish(); - } - - $this->scopeManager->setActive($this->toRestore); - } - - /** - * {@inheritdoc} - */ - public function getSpan(): OTSpan - { - return $this->wrapped; - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ScopeManager.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ScopeManager.php deleted file mode 100644 index eb5c27676..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ScopeManager.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php - -namespace Jaeger; - -use OpenTracing\ScopeManager as OTScopeManager; -use OpenTracing\Span as OTSpan; -use OpenTracing\Scope as OTScope; - -/** - * {@inheritdoc} - */ -class ScopeManager implements OTScopeManager -{ - /** - * @var OTScope - */ - private $active; - - /** - * {@inheritdoc} - */ - public function activate(OTSpan $span, bool $finishSpanOnClose = self::DEFAULT_FINISH_SPAN_ON_CLOSE): OTScope - { - $this->active = new Scope($this, $span, $finishSpanOnClose); - - return $this->active; - } - - /** - * {@inheritdoc} - */ - public function getActive(): ?OTScope - { - return $this->active; - } - - /** - * Sets the scope as active. - * @param OTScope|null $scope - */ - public function setActive(OTScope $scope = null) - { - $this->active = $scope; - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sender/JaegerSender.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sender/JaegerSender.php deleted file mode 100644 index dfce510b8..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sender/JaegerSender.php +++ /dev/null @@ -1,236 +0,0 @@ -<?php - - -namespace Jaeger\Sender; - -use Jaeger\Mapper\SpanToJaegerMapper; -use Jaeger\Span as JaegerSpan; -use Jaeger\Thrift\Agent\AgentClient; -use Jaeger\Thrift\Agent\AgentIf; -use Jaeger\Thrift\Batch; -use Jaeger\Thrift\Process; -use Jaeger\Thrift\Span as JaegerThriftSpan; -use Jaeger\Thrift\Tag; -use Jaeger\Thrift\TagType; -use Jaeger\Tracer; -use Psr\Log\LoggerInterface; -use Psr\Log\NullLogger; -use Thrift\Protocol\TBinaryProtocol; -use Thrift\Protocol\TCompactProtocol; -use Thrift\Transport\TMemoryBuffer; -use const Jaeger\JAEGER_HOSTNAME_TAG_KEY; - -class JaegerSender implements SenderInterface -{ - /** - * @var JaegerSpan[] - */ - private $spans = []; - - /** - * @var AgentIf - */ - private $agentClient; - - /** - * @var LoggerInterface - */ - private $logger; - - /** - * @var Tracer - */ - private $tracer; - - /** - * @var SpanToJaegerMapper - */ - private $mapper; - - /** - * @var int - */ - private $jaegerBatchOverheadLength = 512; - - /** - * The maximum length of the thrift-objects for a jaeger-batch. - * - * @var int - */ - private $maxBufferLength = 64000; - - /** - * @param AgentIf $agentClient - * @param LoggerInterface|null $logger - * @param SpanToJaegerMapper|null $mapper - */ - public function __construct( - AgentIf $agentClient, - LoggerInterface $logger = null, - SpanToJaegerMapper $mapper = null - ) { - $this->agentClient = $agentClient; - $this->logger = $logger ?? new NullLogger(); - $this->mapper = $mapper ?? new SpanToJaegerMapper(); - } - - - public function flush(): int - { - $count = count($this->spans); - if ($count === 0) { - return 0; - } - - $jaegerThriftSpans = $this->makeJaegerBatch($this->spans); - - try { - $this->send($jaegerThriftSpans); - } catch (\Exception $e) { - $this->logger->warning($e->getMessage()); - } - - $this->spans = []; - - return $count; - } - - public function setMaxBufferLength($maxBufferLength) - { - $this->maxBufferLength = $maxBufferLength; - } - - /** - * @param JaegerSpan[] $spans - * @return array - */ - private function makeJaegerBatch(array $spans) : array - { - /** @var JaegerThriftSpan[] $jaegerSpans */ - $jaegerSpans = []; - - foreach ($spans as $span) { - if (empty($this->tracer)) { - $this->tracer = $span->getTracer(); - } - - $jaegerSpans[] = $this->mapper->mapSpanToJaeger($span); - } - - return $jaegerSpans; - } - - /** - * @param JaegerThriftSpan[] $spans - */ - private function send(array $spans) - { - if (empty($this->tracer)) { - return ; - } - - $chunks = $this->chunkSplit($spans); - foreach ($chunks as $chunk) { - /** @var JaegerThriftSpan[] $chunk */ - $this->emitJaegerBatch($chunk); - } - } - - /** - * @param JaegerThriftSpan $span - */ - private function getBufferLength($span) - { - $memoryBuffer = new TMemoryBuffer(); - $span->write(new TBinaryProtocol($memoryBuffer)); - return $memoryBuffer->available(); - } - - private function chunkSplit(array $spans): array - { - $actualBufferSize = $this->jaegerBatchOverheadLength; - $chunkId = 0; - $chunks = []; - - foreach ($spans as $span) { - $spanBufferLength = $this->getBufferLength($span); - if (!empty($chunks[$chunkId]) && ($actualBufferSize + $spanBufferLength) > $this->maxBufferLength) { - // point to next chunk - ++$chunkId; - - // reset buffer size - $actualBufferSize = $this->jaegerBatchOverheadLength; - } - - if (!isset($chunks[$chunkId])) { - $chunks[$chunkId] = []; - } - - $chunks[$chunkId][] = $span; - $actualBufferSize += $spanBufferLength; - } - - return $chunks; - } - - protected function emitJaegerBatch(array $spans) - { - /** @var Tag[] $tags */ - $tags = []; - - foreach ($this->tracer->getTags() as $k => $v) { - if (!in_array($k, $this->mapper->getSpecialSpanTags())) { - if (strpos($k, $this->mapper->getProcessTagsPrefix()) !== 0) { - continue ; - } - - $quoted = preg_quote($this->mapper->getProcessTagsPrefix()); - $k = preg_replace(sprintf('/^%s/', $quoted), '', $k); - } - - if ($k === JAEGER_HOSTNAME_TAG_KEY) { - $k = "hostname"; - } - - $tags[] = new Tag([ - "key" => $k, - "vType" => TagType::STRING, - "vStr" => $v - ]); - } - - $tags[] = new Tag([ - "key" => "format", - "vType" => TagType::STRING, - "vStr" => "jaeger.thrift" - ]); - - $tags[] = new Tag([ - "key" => "ip", - "vType" => TagType::STRING, - "vStr" => $this->tracer->getIpAddress() - ]); - - $batch = new Batch([ - "spans" => $spans, - "process" => new Process([ - "serviceName" => $this->tracer->getServiceName(), - "tags" => $tags - ]) - ]); - - $this->agentClient->emitBatch($batch); - } - - /** - * @param JaegerSpan $span - */ - public function append(JaegerSpan $span) - { - $this->spans[] = $span; - } - - public function close() - { - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sender/SenderInterface.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sender/SenderInterface.php deleted file mode 100644 index 24dc4fbfa..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sender/SenderInterface.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php - -namespace Jaeger\Sender; - -use Jaeger\Span as JaegerSpan; - -interface SenderInterface -{ - public function flush(): int; - public function append(JaegerSpan $span); - public function close(); -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sender/UdpSender.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sender/UdpSender.php deleted file mode 100644 index ff0e4cf3e..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sender/UdpSender.php +++ /dev/null @@ -1,305 +0,0 @@ -<?php - -namespace Jaeger\Sender; - -use Exception; -use Jaeger\Thrift\Agent\AgentClient; -use Jaeger\Thrift\Agent\Zipkin\Annotation; -use Jaeger\Thrift\Agent\Zipkin\AnnotationType; -use Jaeger\Thrift\Agent\Zipkin\BinaryAnnotation; -use Jaeger\Thrift\Agent\Zipkin\Endpoint; -use Jaeger\Thrift\Agent\Zipkin\Span as ThriftSpan; -use Psr\Log\LoggerInterface; -use Psr\Log\NullLogger; -use Thrift\Base\TBase; -use Thrift\Protocol\TCompactProtocol; -use Thrift\Transport\TMemoryBuffer; -use Jaeger\Span as JaegerSpan; - -use const OpenTracing\Tags\COMPONENT; - -class UdpSender -{ - const CLIENT_ADDR = "ca"; - const SERVER_ADDR = "sa"; - - /** - * @var JaegerSpan[] - */ - private $spans = []; - - /** - * @var AgentClient - */ - private $client; - - /** - * @var LoggerInterface - */ - private $logger; - - /** - * The maximum length of the thrift-objects for a zipkin-batch. - * - * @var int - */ - private $maxBufferLength; - - /** - * The length of the zipkin-batch overhead. - * - * @var int - */ - private $zipkinBatchOverheadLength = 30; - - /** - * UdpSender constructor. - * - * @param AgentClient $client - * @param int $maxBufferLength - * @param LoggerInterface|null $logger - */ - public function __construct( - AgentClient $client, - int $maxBufferLength, - LoggerInterface $logger = null - ) { - $this->client = $client; - $this->maxBufferLength = $maxBufferLength; - $this->logger = $logger ?? new NullLogger(); - } - - /** - * @param JaegerSpan $span - */ - public function append(JaegerSpan $span) - { - $this->spans[] = $span; - } - - /** - * @return int the number of flushed spans - */ - public function flush(): int - { - $count = count($this->spans); - if ($count === 0) { - return 0; - } - - $zipkinSpans = $this->makeZipkinBatch($this->spans); - - try { - $this->send($zipkinSpans); - } catch (Exception $e) { - $this->logger->warning($e->getMessage()); - } - - $this->spans = []; - - return $count; - } - - public function close() - { - } - - /** - * Emits the thrift-objects. - * - * @param array|ThriftSpan[]|TBase[] $thrifts - */ - private function send(array $thrifts) - { - foreach ($this->chunkSplit($thrifts) as $chunk) { - /* @var $chunk ThriftSpan[] */ - $this->client->emitZipkinBatch($chunk); - } - } - - /** - * @param JaegerSpan[] $spans - * @return ThriftSpan[] - */ - private function makeZipkinBatch(array $spans): array - { - /** @var ThriftSpan[] */ - $zipkinSpans = []; - - foreach ($spans as $span) { - /** @var JaegerSpan $span */ - - $endpoint = $this->makeEndpoint( - $span->getTracer()->getIpAddress(), - 0, // span.port, - $span->getTracer()->getServiceName() - ); - - $timestamp = $span->getStartTime(); - $duration = $span->getEndTime() - $span->getStartTime(); - - $this->addZipkinAnnotations($span, $endpoint); - - $zipkinSpan = new ThriftSpan([ - 'name' => $span->getOperationName(), - 'id' => $span->getContext()->getSpanId(), - 'parent_id' => $span->getContext()->getParentId() ?? null, - 'trace_id' => $span->getContext()->getTraceId(), - 'annotations' => $this->createAnnotations($span, $endpoint), - 'binary_annotations' => $span->getTags(), - 'debug' => $span->isDebug(), - 'timestamp' => $timestamp, - 'duration' => $duration, - ]); - - $zipkinSpans[] = $zipkinSpan; - } - - return $zipkinSpans; - } - - private function addZipkinAnnotations(JaegerSpan $span, Endpoint $endpoint) - { - if ($span->isRpc() && $span->peer) { - $isClient = $span->isRpcClient(); - - $host = $this->makeEndpoint( - $span->peer['ipv4'] ?? 0, - $span->peer['port'] ?? 0, - $span->peer['service_name'] ?? '' - ); - - $key = ($isClient) ? self::SERVER_ADDR : self::CLIENT_ADDR; - - $peer = $this->makePeerAddressTag($key, $host); - $span->tags[$key] = $peer; - } else { - $tag = $this->makeLocalComponentTag( - $span->getComponent() ?? $span->getTracer()->getServiceName(), - $endpoint - ); - - $span->tags[COMPONENT] = $tag; - } - } - - private function makeLocalComponentTag(string $componentName, Endpoint $endpoint): BinaryAnnotation - { - return new BinaryAnnotation([ - 'key' => "lc", - 'value' => $componentName, - 'annotation_type' => AnnotationType::STRING, - 'host' => $endpoint, - ]); - } - - private function makeEndpoint(string $ipv4, int $port, string $serviceName): Endpoint - { - $ipv4 = $this->ipv4ToInt($ipv4); - - return new Endpoint([ - 'ipv4' => $ipv4, - 'port' => $port, - 'service_name' => $serviceName, - ]); - } - - private function ipv4ToInt(string $ipv4): int - { - if ($ipv4 == 'localhost') { - $ipv4 = '127.0.0.1'; - } elseif ($ipv4 == '::1') { - $ipv4 = '127.0.0.1'; - } - - $long = ip2long($ipv4); - if (PHP_INT_SIZE === 8) { - return $long >> 31 ? $long - (1 << 32) : $long; - } - return $long; - } - - // Used for Zipkin binary annotations like CA/SA (client/server address). - // They are modeled as Boolean type with '0x01' as the value. - private function makePeerAddressTag(string $key, Endpoint $host): BinaryAnnotation - { - return new BinaryAnnotation([ - "key" => $key, - "value" => '0x01', - "annotation_type" => AnnotationType::BOOL, - "host" => $host, - ]); - } - - /** - * Splits an array of thrift-objects into several chunks when the buffer limit has been reached. - * - * @param array|ThriftSpan[]|TBase[] $thrifts - * - * @return array - */ - private function chunkSplit(array $thrifts): array - { - $actualBufferSize = $this->zipkinBatchOverheadLength; - $chunkId = 0; - $chunks = []; - - foreach ($thrifts as $thrift) { - $spanBufferLength = $this->getBufferLength($thrift); - - if (!empty($chunks[$chunkId]) && ($actualBufferSize + $spanBufferLength) > $this->maxBufferLength) { - // point to next chunk - ++$chunkId; - - // reset buffer size - $actualBufferSize = $this->zipkinBatchOverheadLength; - } - - if (!isset($chunks[$chunkId])) { - $chunks[$chunkId] = []; - } - - $chunks[$chunkId][] = $thrift; - $actualBufferSize += $spanBufferLength; - } - - return $chunks; - } - - /** - * Returns the length of a thrift-object. - * - * @param ThriftSpan|TBase $thrift - * - * @return int - */ - private function getBufferLength($thrift): int - { - $memoryBuffer = new TMemoryBuffer(); - - $thrift->write(new TCompactProtocol($memoryBuffer)); - - return $memoryBuffer->available(); - } - - /* - * @param JaegerSpan $span - * @param Endpoint $endpoint - * - * @return array|Annotation[] - */ - private function createAnnotations(JaegerSpan $span, Endpoint $endpoint): array - { - $annotations = []; - - foreach ($span->getLogs() as $values) { - $annotations[] = new Annotation([ - 'timestamp' => $values['timestamp'], - 'value' => json_encode($values['fields']), - 'host' => $endpoint, - ]); - } - - return $annotations; - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Span.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Span.php deleted file mode 100644 index abcb07c89..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Span.php +++ /dev/null @@ -1,476 +0,0 @@ -<?php - -namespace Jaeger; - -use Jaeger\Thrift\Agent\Zipkin\AnnotationType; -use Jaeger\Thrift\Agent\Zipkin\BinaryAnnotation; -use OpenTracing\Span as OTSpan; -use DateTime; -use DateTimeInterface; -use OpenTracing\SpanContext as OTSpanContext; -use const OpenTracing\Tags\COMPONENT; -use const OpenTracing\Tags\PEER_HOST_IPV4; -use const OpenTracing\Tags\PEER_PORT; -use const OpenTracing\Tags\PEER_SERVICE; -use const OpenTracing\Tags\SPAN_KIND; -use const OpenTracing\Tags\SPAN_KIND_MESSAGE_BUS_CONSUMER; -use const OpenTracing\Tags\SPAN_KIND_MESSAGE_BUS_PRODUCER; -use const OpenTracing\Tags\SPAN_KIND_RPC_CLIENT; -use const OpenTracing\Tags\SPAN_KIND_RPC_SERVER; - -class Span implements OTSpan -{ - /** - * @var Tracer - */ - private $tracer; - - /** - * @var SpanContext - */ - private $context; - - /** - * @var string - */ - private $operationName; - - /** - * @var int|float|DateTime|null - */ - private $startTime; - - /** - * @var int|float|DateTime|null - */ - private $endTime; - - /** - * SPAN_RPC_CLIENT - * @var null|string - */ - private $kind; - - /** - * @var array|null - */ - public $peer; - - /** - * @var string|null - */ - private $component; - - /** - * @var array - */ - private $logs = []; - - /** - * @var BinaryAnnotation[] - */ - public $tags = []; - - /** - * @var bool - */ - private $debug = false; - - /** - * Span constructor. - * @param SpanContext $context - * @param Tracer $tracer - * @param string $operationName - * @param array $tags - * @param int|float|DateTime|null $startTime - */ - public function __construct( - SpanContext $context, - Tracer $tracer, - string $operationName, - array $tags = [], - $startTime = null - ) { - $this->context = $context; - $this->tracer = $tracer; - - $this->operationName = $operationName; - $this->startTime = $this->microTime($startTime); - $this->endTime = null; - $this->kind = null; - $this->peer = null; - $this->component = null; - - foreach ($tags as $key => $value) { - $this->setTag($key, $value); - } - } - - /** - * Converts time to microtime int - * - int represents microseconds - * - float represents seconds - * - * @param int|float|DateTime|null $time - * @return int - */ - protected function microTime($time): int - { - if ($time === null) { - return $this->timestampMicro(); - } - - if ($time instanceof \DateTimeInterface) { - return (int)round($time->format('U.u') * 1000000, 0); - } - - if (is_int($time)) { - return $time; - } - - if (is_float($time)) { - return (int)round($time * 1000000, 0); - } - - throw new \InvalidArgumentException(sprintf( - 'Time should be one of the types int|float|DateTime|null, got %s.', - gettype($time) - )); - } - - /** - * @return Tracer - */ - public function getTracer(): Tracer - { - return $this->tracer; - } - - /** - * @return bool - */ - public function isDebug(): bool - { - return $this->debug; - } - - /** - * @return int - */ - public function getStartTime(): int - { - return $this->startTime; - } - - /** - * @return int|null - */ - public function getEndTime() - { - return $this->endTime; - } - - /** - * @return string - */ - public function getOperationName(): string - { - return $this->operationName; - } - - /** - * @return mixed - */ - public function getComponent() - { - // TODO - return $this->component; - } - - /** - * {@inheritdoc} - * - * @return SpanContext - */ - public function getContext(): OTSpanContext - { - return $this->context; - } - - /** - * {@inheritdoc} - */ - public function finish($finishTime = null, array $logRecords = []): void - { - if (!$this->isSampled()) { - return; - } - - foreach ($logRecords as $logRecord) { - $this->log($logRecord); - } - - $this->endTime = $this->microTime($finishTime); - $this->tracer->reportSpan($this); - } - - /** - * Returns true if the trace should be measured. - * - * @return bool - */ - public function isSampled(): bool - { - $context = $this->getContext(); - - return ($context->getFlags() & SAMPLED_FLAG) == SAMPLED_FLAG; - } - - /** - * {@inheritdoc} - */ - public function overwriteOperationName(string $newOperationName): void - { - // TODO log warning - $this->operationName = $newOperationName; - } - - /** - * {@inheritdoc} - * - * @param array $tags - * @return void - */ - public function setTags($tags) - { - foreach ($tags as $key => $value) { - $this->setTag($key, $value); - } - } - - /** - * {@inheritdoc} - */ - public function setTag(string $key, $value): void - { - if ($this->isSampled()) { - $special = self::SPECIAL_TAGS[$key] ?? null; - $handled = false; - - if ($special !== null && is_callable([$this, $special])) { - $handled = $this->$special($value); - } - - if (!$handled) { - $tag = $this->makeTag($key, $value); - $this->tags[$key] = $tag; - } - } - } - - const SPECIAL_TAGS = [ - PEER_SERVICE => 'setPeerService', - PEER_HOST_IPV4 => 'setPeerHostIpv4', - PEER_PORT => 'setPeerPort', - SPAN_KIND => 'setSpanKind', - COMPONENT => 'setComponent', - ]; - - /** - * Sets a low-cardinality identifier of the module, library, - * or package that is generating a span. - * - * @see Span::setTag() - * - * @param string $value - * @return bool - */ - private function setComponent($value): bool - { - $this->component = $value; - return true; - } - - /** - * @return bool - */ - private function setSpanKind($value): bool - { - $validSpanKinds = [ - SPAN_KIND_RPC_CLIENT, - SPAN_KIND_RPC_SERVER, - SPAN_KIND_MESSAGE_BUS_CONSUMER, - SPAN_KIND_MESSAGE_BUS_PRODUCER, - ]; - - if ($value === null || in_array($value, $validSpanKinds, true)) { - $this->kind = $value; - return true; - } - return false; - } - - /** - * @return string|null - */ - public function getKind(): ?string - { - return $this->kind; - } - - /** - * @return bool - */ - private function setPeerPort($value): bool - { - if ($this->peer === null) { - $this->peer = ['port' => $value]; - } else { - $this->peer['port'] = $value; - } - return true; - } - - /** - * @return bool - */ - private function setPeerHostIpv4($value): bool - { - if ($this->peer === null) { - $this->peer = ['ipv4' => $value]; - } else { - $this->peer['ipv4'] = $value; - } - return true; - } - - /** - * @return bool - */ - private function setPeerService($value): bool - { - if ($this->peer === null) { - $this->peer = ['service_name' => $value]; - } else { - $this->peer['service_name'] = $value; - } - return true; - } - - /** - * @return bool - */ - public function isRpc(): bool - { - return $this->kind == SPAN_KIND_RPC_CLIENT || $this->kind == SPAN_KIND_RPC_SERVER; - } - - /** - * @return bool - */ - public function isRpcClient(): bool - { - return $this->kind == SPAN_KIND_RPC_CLIENT; - } - - /** - * {@inheritdoc} - */ - public function log(array $fields = [], $timestamp = null): void - { - $timestamp = $this->microTime($timestamp); - if ($timestamp < $this->getStartTime()) { - $timestamp = $this->timestampMicro(); - } - - $this->logs[] = [ - 'fields' => $fields, - 'timestamp' => $timestamp, - ]; - } - - /** - * Returns the logs. - * - * [ - * [ - * 'timestamp' => timestamp in microsecond, - * 'fields' => [ - * 'error' => 'message', - * ] - * ] - * ] - * - * @return array - */ - public function getLogs(): array - { - return $this->logs; - } - - /** - * {@inheritdoc} - */ - public function addBaggageItem(string $key, string $value): void - { - $this->context = $this->context->withBaggageItem($key, $value); - } - - /** - * {@inheritdoc} - */ - public function getBaggageItem(string $key): ?string - { - return $this->context->getBaggageItem($key); - } - - /** - * @return array - */ - public function getTags(): array - { - return $this->tags; - } - - /** - * @return int - */ - private function timestampMicro(): int - { - return round(microtime(true) * 1000000); - } - - /** - * @param string $key - * @param mixed $value - * @return BinaryAnnotation - */ - private function makeTag(string $key, $value): BinaryAnnotation - { - $valueType = gettype($value); - $annotationType = null; - switch ($valueType) { - case "boolean": - $annotationType = AnnotationType::BOOL; - break; - case "integer": - $annotationType = AnnotationType::I64; - break; - case "double": - $annotationType = AnnotationType::DOUBLE; - break; - default: - $annotationType = AnnotationType::STRING; - $value = (string)$value; - if (strlen($value) > 1024) { - $value = substr($value, 0, 1024); - } - } - - return new BinaryAnnotation([ - 'key' => $key, - 'value' => $value, - 'annotation_type' => $annotationType, - ]); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/SpanContext.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/SpanContext.php deleted file mode 100644 index 447ffd1a5..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/SpanContext.php +++ /dev/null @@ -1,120 +0,0 @@ -<?php - -namespace Jaeger; - -use ArrayIterator; -use OpenTracing\SpanContext as OTSpanContext; - -class SpanContext implements OTSpanContext -{ - private $traceId; - - private $spanId; - - private $parentId; - - private $flags; - - /** - * @var array - */ - private $baggage; - - private $debugId; - - /** - * SpanContext constructor. - * - * @param string $traceId - * @param string $spanId - * @param string $parentId - * @param int|null $flags - * @param array $baggage - * @param int|null $debugId - */ - public function __construct($traceId, $spanId, $parentId, $flags = null, $baggage = [], $debugId = null) - { - $this->traceId = $traceId; - $this->spanId = $spanId; - $this->parentId = $parentId; - $this->flags = $flags; - $this->baggage = is_array($baggage) ? $baggage : []; - $this->debugId = $debugId; - } - - /** - * {@inheritdoc} - * @return ArrayIterator - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new ArrayIterator($this->baggage); - } - - /** - * {@inheritdoc} - */ - public function getBaggageItem(string $key): ?string - { - return array_key_exists($key, $this->baggage) ? $this->baggage[$key] : null; - } - - /** - * {@inheritdoc} - * - * @param string $key - * @param string $value - * @return SpanContext - */ - public function withBaggageItem(string $key, string $value): OTSpanContext - { - return new self( - $this->traceId, - $this->spanId, - $this->parentId, - $this->flags, - [$key => $value] + $this->baggage - ); - } - - public function getTraceId() - { - return $this->traceId; - } - - public function getParentId() - { - return $this->parentId; - } - - public function getSpanId() - { - return $this->spanId; - } - - /** - * Get the span context flags. - * - * @return int|null - */ - public function getFlags() - { - return $this->flags; - } - - public function getBaggage() - { - return $this->baggage; - } - - public function getDebugId() - { - return $this->debugId; - } - - public function isDebugIdContainerOnly(): bool - { - return ($this->traceId === null) && ($this->debugId !== null); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AgentClient.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AgentClient.php deleted file mode 100644 index 640df4598..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AgentClient.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class AgentClient implements \Jaeger\Thrift\Agent\AgentIf { - protected $input_ = null; - protected $output_ = null; - - protected $seqid_ = 0; - - public function __construct($input, $output=null) { - $this->input_ = $input; - $this->output_ = $output ? $output : $input; - } - - public function emitZipkinBatch(array $spans) - { - $this->send_emitZipkinBatch($spans); - } - - public function send_emitZipkinBatch(array $spans) - { - $args = new \Jaeger\Thrift\Agent\Agent_emitZipkinBatch_args(); - $args->spans = $spans; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'emitZipkinBatch', TMessageType::ONEWAY, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('emitZipkinBatch', TMessageType::ONEWAY, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - public function emitBatch(\Jaeger\Thrift\Batch $batch) - { - $this->send_emitBatch($batch); - } - - public function send_emitBatch(\Jaeger\Thrift\Batch $batch) - { - $args = new \Jaeger\Thrift\Agent\Agent_emitBatch_args(); - $args->batch = $batch; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'emitBatch', TMessageType::ONEWAY, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('emitBatch', TMessageType::ONEWAY, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } -} - - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AgentIf.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AgentIf.php deleted file mode 100644 index 30efc8cf3..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AgentIf.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -interface AgentIf { - /** - * @param \Jaeger\Thrift\Agent\Zipkin\Span[] $spans - */ - public function emitZipkinBatch(array $spans); - /** - * @param \Jaeger\Thrift\Batch $batch - */ - public function emitBatch(\Jaeger\Thrift\Batch $batch); -} - - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Agent_emitBatch_args.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Agent_emitBatch_args.php deleted file mode 100644 index 9d11b409c..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Agent_emitBatch_args.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class Agent_emitBatch_args extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'batch', - 'isRequired' => false, - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Batch', - ), - ); - - /** - * @var \Jaeger\Thrift\Batch - */ - public $batch = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'Agent_emitBatch_args'; - } - - public function read($input) - { - return $this->_read('Agent_emitBatch_args', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('Agent_emitBatch_args', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Agent_emitZipkinBatch_args.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Agent_emitZipkinBatch_args.php deleted file mode 100644 index cc58527bb..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Agent_emitZipkinBatch_args.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class Agent_emitZipkinBatch_args extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'spans', - 'isRequired' => false, - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Agent\Zipkin\Span', - ), - ), - ); - - /** - * @var \Jaeger\Thrift\Agent\Zipkin\Span[] - */ - public $spans = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'Agent_emitZipkinBatch_args'; - } - - public function read($input) - { - return $this->_read('Agent_emitZipkinBatch_args', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('Agent_emitZipkinBatch_args', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidatorClient.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidatorClient.php deleted file mode 100644 index 73825978a..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidatorClient.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class AggregationValidatorClient implements \Jaeger\Thrift\Agent\AggregationValidatorIf { - protected $input_ = null; - protected $output_ = null; - - protected $seqid_ = 0; - - public function __construct($input, $output=null) { - $this->input_ = $input; - $this->output_ = $output ? $output : $input; - } - - public function validateTrace($traceId) - { - $this->send_validateTrace($traceId); - return $this->recv_validateTrace(); - } - - public function send_validateTrace($traceId) - { - $args = new \Jaeger\Thrift\Agent\AggregationValidator_validateTrace_args(); - $args->traceId = $traceId; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'validateTrace', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('validateTrace', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_validateTrace() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Jaeger\Thrift\Agent\AggregationValidator_validateTrace_result', $this->input_->isStrictRead()); - else - { - $rseqid = 0; - $fname = null; - $mtype = 0; - - $this->input_->readMessageBegin($fname, $mtype, $rseqid); - if ($mtype == TMessageType::EXCEPTION) { - $x = new TApplicationException(); - $x->read($this->input_); - $this->input_->readMessageEnd(); - throw $x; - } - $result = new \Jaeger\Thrift\Agent\AggregationValidator_validateTrace_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("validateTrace failed: unknown result"); - } - -} - - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidatorIf.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidatorIf.php deleted file mode 100644 index 853cd2a4f..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidatorIf.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -interface AggregationValidatorIf { - /** - * @param string $traceId - * @return \Jaeger\Thrift\Agent\ValidateTraceResponse - */ - public function validateTrace($traceId); -} - - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidator_validateTrace_args.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidator_validateTrace_args.php deleted file mode 100644 index 2f4d1171c..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidator_validateTrace_args.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class AggregationValidator_validateTrace_args extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'traceId', - 'isRequired' => true, - 'type' => TType::STRING, - ), - ); - - /** - * @var string - */ - public $traceId = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'AggregationValidator_validateTrace_args'; - } - - public function read($input) - { - return $this->_read('AggregationValidator_validateTrace_args', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('AggregationValidator_validateTrace_args', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidator_validateTrace_result.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidator_validateTrace_result.php deleted file mode 100644 index 6060c5ae3..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/AggregationValidator_validateTrace_result.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class AggregationValidator_validateTrace_result extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 0 => array( - 'var' => 'success', - 'isRequired' => false, - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Agent\ValidateTraceResponse', - ), - ); - - /** - * @var \Jaeger\Thrift\Agent\ValidateTraceResponse - */ - public $success = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'AggregationValidator_validateTrace_result'; - } - - public function read($input) - { - return $this->_read('AggregationValidator_validateTrace_result', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('AggregationValidator_validateTrace_result', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestriction.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestriction.php deleted file mode 100644 index 27593c4c1..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestriction.php +++ /dev/null @@ -1,65 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class BaggageRestriction extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'baggageKey', - 'isRequired' => true, - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'maxValueLength', - 'isRequired' => true, - 'type' => TType::I32, - ), - ); - - /** - * @var string - */ - public $baggageKey = null; - /** - * @var int - */ - public $maxValueLength = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'BaggageRestriction'; - } - - public function read($input) - { - return $this->_read('BaggageRestriction', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('BaggageRestriction', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManagerClient.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManagerClient.php deleted file mode 100644 index 379153534..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManagerClient.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class BaggageRestrictionManagerClient implements \Jaeger\Thrift\Agent\BaggageRestrictionManagerIf { - protected $input_ = null; - protected $output_ = null; - - protected $seqid_ = 0; - - public function __construct($input, $output=null) { - $this->input_ = $input; - $this->output_ = $output ? $output : $input; - } - - public function getBaggageRestrictions($serviceName) - { - $this->send_getBaggageRestrictions($serviceName); - return $this->recv_getBaggageRestrictions(); - } - - public function send_getBaggageRestrictions($serviceName) - { - $args = new \Jaeger\Thrift\Agent\BaggageRestrictionManager_getBaggageRestrictions_args(); - $args->serviceName = $serviceName; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'getBaggageRestrictions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('getBaggageRestrictions', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_getBaggageRestrictions() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Jaeger\Thrift\Agent\BaggageRestrictionManager_getBaggageRestrictions_result', $this->input_->isStrictRead()); - else - { - $rseqid = 0; - $fname = null; - $mtype = 0; - - $this->input_->readMessageBegin($fname, $mtype, $rseqid); - if ($mtype == TMessageType::EXCEPTION) { - $x = new TApplicationException(); - $x->read($this->input_); - $this->input_->readMessageEnd(); - throw $x; - } - $result = new \Jaeger\Thrift\Agent\BaggageRestrictionManager_getBaggageRestrictions_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("getBaggageRestrictions failed: unknown result"); - } - -} - - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManagerIf.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManagerIf.php deleted file mode 100644 index 010bda741..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManagerIf.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -interface BaggageRestrictionManagerIf { - /** - * getBaggageRestrictions retrieves the baggage restrictions for a specific service. - * Usually, baggageRestrictions apply to all services however there may be situations - * where a baggageKey might only be allowed to be set by a specific service. - * - * @param string $serviceName - * @return \Jaeger\Thrift\Agent\BaggageRestriction[] - */ - public function getBaggageRestrictions($serviceName); -} - - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManager_getBaggageRestrictions_args.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManager_getBaggageRestrictions_args.php deleted file mode 100644 index 6f2b4650a..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManager_getBaggageRestrictions_args.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class BaggageRestrictionManager_getBaggageRestrictions_args extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'serviceName', - 'isRequired' => false, - 'type' => TType::STRING, - ), - ); - - /** - * @var string - */ - public $serviceName = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'BaggageRestrictionManager_getBaggageRestrictions_args'; - } - - public function read($input) - { - return $this->_read('BaggageRestrictionManager_getBaggageRestrictions_args', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('BaggageRestrictionManager_getBaggageRestrictions_args', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManager_getBaggageRestrictions_result.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManager_getBaggageRestrictions_result.php deleted file mode 100644 index a3c52b37c..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/BaggageRestrictionManager_getBaggageRestrictions_result.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class BaggageRestrictionManager_getBaggageRestrictions_result extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 0 => array( - 'var' => 'success', - 'isRequired' => false, - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Agent\BaggageRestriction', - ), - ), - ); - - /** - * @var \Jaeger\Thrift\Agent\BaggageRestriction[] - */ - public $success = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'BaggageRestrictionManager_getBaggageRestrictions_result'; - } - - public function read($input) - { - return $this->_read('BaggageRestrictionManager_getBaggageRestrictions_result', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('BaggageRestrictionManager_getBaggageRestrictions_result', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependencies.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependencies.php deleted file mode 100644 index 4295b9798..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependencies.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class Dependencies extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'links', - 'isRequired' => true, - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Agent\DependencyLink', - ), - ), - ); - - /** - * @var \Jaeger\Thrift\Agent\DependencyLink[] - */ - public $links = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'Dependencies'; - } - - public function read($input) - { - return $this->_read('Dependencies', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('Dependencies', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/DependencyClient.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/DependencyClient.php deleted file mode 100644 index 2c247633d..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/DependencyClient.php +++ /dev/null @@ -1,105 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class DependencyClient implements \Jaeger\Thrift\Agent\DependencyIf { - protected $input_ = null; - protected $output_ = null; - - protected $seqid_ = 0; - - public function __construct($input, $output=null) { - $this->input_ = $input; - $this->output_ = $output ? $output : $input; - } - - public function getDependenciesForTrace($traceId) - { - $this->send_getDependenciesForTrace($traceId); - return $this->recv_getDependenciesForTrace(); - } - - public function send_getDependenciesForTrace($traceId) - { - $args = new \Jaeger\Thrift\Agent\Dependency_getDependenciesForTrace_args(); - $args->traceId = $traceId; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'getDependenciesForTrace', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('getDependenciesForTrace', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_getDependenciesForTrace() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Jaeger\Thrift\Agent\Dependency_getDependenciesForTrace_result', $this->input_->isStrictRead()); - else - { - $rseqid = 0; - $fname = null; - $mtype = 0; - - $this->input_->readMessageBegin($fname, $mtype, $rseqid); - if ($mtype == TMessageType::EXCEPTION) { - $x = new TApplicationException(); - $x->read($this->input_); - $this->input_->readMessageEnd(); - throw $x; - } - $result = new \Jaeger\Thrift\Agent\Dependency_getDependenciesForTrace_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("getDependenciesForTrace failed: unknown result"); - } - - public function saveDependencies(\Jaeger\Thrift\Agent\Dependencies $dependencies) - { - $this->send_saveDependencies($dependencies); - } - - public function send_saveDependencies(\Jaeger\Thrift\Agent\Dependencies $dependencies) - { - $args = new \Jaeger\Thrift\Agent\Dependency_saveDependencies_args(); - $args->dependencies = $dependencies; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'saveDependencies', TMessageType::ONEWAY, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('saveDependencies', TMessageType::ONEWAY, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } -} - - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/DependencyIf.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/DependencyIf.php deleted file mode 100644 index c9432e7d8..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/DependencyIf.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -interface DependencyIf { - /** - * @param string $traceId - * @return \Jaeger\Thrift\Agent\Dependencies - */ - public function getDependenciesForTrace($traceId); - /** - * @param \Jaeger\Thrift\Agent\Dependencies $dependencies - */ - public function saveDependencies(\Jaeger\Thrift\Agent\Dependencies $dependencies); -} - - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/DependencyLink.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/DependencyLink.php deleted file mode 100644 index 14cfa5132..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/DependencyLink.php +++ /dev/null @@ -1,74 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class DependencyLink extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'parent', - 'isRequired' => true, - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'child', - 'isRequired' => true, - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'callCount', - 'isRequired' => true, - 'type' => TType::I64, - ), - ); - - /** - * @var string - */ - public $parent = null; - /** - * @var string - */ - public $child = null; - /** - * @var int - */ - public $callCount = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'DependencyLink'; - } - - public function read($input) - { - return $this->_read('DependencyLink', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('DependencyLink', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependency_getDependenciesForTrace_args.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependency_getDependenciesForTrace_args.php deleted file mode 100644 index 5100ea77b..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependency_getDependenciesForTrace_args.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class Dependency_getDependenciesForTrace_args extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'traceId', - 'isRequired' => true, - 'type' => TType::STRING, - ), - ); - - /** - * @var string - */ - public $traceId = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'Dependency_getDependenciesForTrace_args'; - } - - public function read($input) - { - return $this->_read('Dependency_getDependenciesForTrace_args', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('Dependency_getDependenciesForTrace_args', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependency_getDependenciesForTrace_result.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependency_getDependenciesForTrace_result.php deleted file mode 100644 index ebdd1303e..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependency_getDependenciesForTrace_result.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class Dependency_getDependenciesForTrace_result extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 0 => array( - 'var' => 'success', - 'isRequired' => false, - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Agent\Dependencies', - ), - ); - - /** - * @var \Jaeger\Thrift\Agent\Dependencies - */ - public $success = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'Dependency_getDependenciesForTrace_result'; - } - - public function read($input) - { - return $this->_read('Dependency_getDependenciesForTrace_result', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('Dependency_getDependenciesForTrace_result', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependency_saveDependencies_args.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependency_saveDependencies_args.php deleted file mode 100644 index 0d250c297..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Dependency_saveDependencies_args.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class Dependency_saveDependencies_args extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'dependencies', - 'isRequired' => false, - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Agent\Dependencies', - ), - ); - - /** - * @var \Jaeger\Thrift\Agent\Dependencies - */ - public $dependencies = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'Dependency_saveDependencies_args'; - } - - public function read($input) - { - return $this->_read('Dependency_saveDependencies_args', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('Dependency_saveDependencies_args', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/OperationSamplingStrategy.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/OperationSamplingStrategy.php deleted file mode 100644 index 7532a7b50..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/OperationSamplingStrategy.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class OperationSamplingStrategy extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'operation', - 'isRequired' => true, - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'probabilisticSampling', - 'isRequired' => true, - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Agent\ProbabilisticSamplingStrategy', - ), - ); - - /** - * @var string - */ - public $operation = null; - /** - * @var \Jaeger\Thrift\Agent\ProbabilisticSamplingStrategy - */ - public $probabilisticSampling = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'OperationSamplingStrategy'; - } - - public function read($input) - { - return $this->_read('OperationSamplingStrategy', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('OperationSamplingStrategy', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/PerOperationSamplingStrategies.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/PerOperationSamplingStrategies.php deleted file mode 100644 index 2a6ae8a61..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/PerOperationSamplingStrategies.php +++ /dev/null @@ -1,88 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class PerOperationSamplingStrategies extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'defaultSamplingProbability', - 'isRequired' => true, - 'type' => TType::DOUBLE, - ), - 2 => array( - 'var' => 'defaultLowerBoundTracesPerSecond', - 'isRequired' => true, - 'type' => TType::DOUBLE, - ), - 3 => array( - 'var' => 'perOperationStrategies', - 'isRequired' => true, - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Agent\OperationSamplingStrategy', - ), - ), - 4 => array( - 'var' => 'defaultUpperBoundTracesPerSecond', - 'isRequired' => false, - 'type' => TType::DOUBLE, - ), - ); - - /** - * @var double - */ - public $defaultSamplingProbability = null; - /** - * @var double - */ - public $defaultLowerBoundTracesPerSecond = null; - /** - * @var \Jaeger\Thrift\Agent\OperationSamplingStrategy[] - */ - public $perOperationStrategies = null; - /** - * @var double - */ - public $defaultUpperBoundTracesPerSecond = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'PerOperationSamplingStrategies'; - } - - public function read($input) - { - return $this->_read('PerOperationSamplingStrategies', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('PerOperationSamplingStrategies', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/ProbabilisticSamplingStrategy.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/ProbabilisticSamplingStrategy.php deleted file mode 100644 index 708ceb9a4..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/ProbabilisticSamplingStrategy.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class ProbabilisticSamplingStrategy extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'samplingRate', - 'isRequired' => true, - 'type' => TType::DOUBLE, - ), - ); - - /** - * @var double - */ - public $samplingRate = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'ProbabilisticSamplingStrategy'; - } - - public function read($input) - { - return $this->_read('ProbabilisticSamplingStrategy', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('ProbabilisticSamplingStrategy', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/RateLimitingSamplingStrategy.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/RateLimitingSamplingStrategy.php deleted file mode 100644 index d5502e8ee..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/RateLimitingSamplingStrategy.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class RateLimitingSamplingStrategy extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'maxTracesPerSecond', - 'isRequired' => true, - 'type' => TType::I16, - ), - ); - - /** - * @var int - */ - public $maxTracesPerSecond = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'RateLimitingSamplingStrategy'; - } - - public function read($input) - { - return $this->_read('RateLimitingSamplingStrategy', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('RateLimitingSamplingStrategy', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManagerClient.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManagerClient.php deleted file mode 100644 index 9f5494a91..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManagerClient.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class SamplingManagerClient implements \Jaeger\Thrift\Agent\SamplingManagerIf { - protected $input_ = null; - protected $output_ = null; - - protected $seqid_ = 0; - - public function __construct($input, $output=null) { - $this->input_ = $input; - $this->output_ = $output ? $output : $input; - } - - public function getSamplingStrategy($serviceName) - { - $this->send_getSamplingStrategy($serviceName); - return $this->recv_getSamplingStrategy(); - } - - public function send_getSamplingStrategy($serviceName) - { - $args = new \Jaeger\Thrift\Agent\SamplingManager_getSamplingStrategy_args(); - $args->serviceName = $serviceName; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'getSamplingStrategy', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('getSamplingStrategy', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_getSamplingStrategy() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Jaeger\Thrift\Agent\SamplingManager_getSamplingStrategy_result', $this->input_->isStrictRead()); - else - { - $rseqid = 0; - $fname = null; - $mtype = 0; - - $this->input_->readMessageBegin($fname, $mtype, $rseqid); - if ($mtype == TMessageType::EXCEPTION) { - $x = new TApplicationException(); - $x->read($this->input_); - $this->input_->readMessageEnd(); - throw $x; - } - $result = new \Jaeger\Thrift\Agent\SamplingManager_getSamplingStrategy_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("getSamplingStrategy failed: unknown result"); - } - -} - - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManagerIf.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManagerIf.php deleted file mode 100644 index ef17cf308..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManagerIf.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -interface SamplingManagerIf { - /** - * @param string $serviceName - * @return \Jaeger\Thrift\Agent\SamplingStrategyResponse - */ - public function getSamplingStrategy($serviceName); -} - - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManager_getSamplingStrategy_args.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManager_getSamplingStrategy_args.php deleted file mode 100644 index f39203efe..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManager_getSamplingStrategy_args.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class SamplingManager_getSamplingStrategy_args extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'serviceName', - 'isRequired' => false, - 'type' => TType::STRING, - ), - ); - - /** - * @var string - */ - public $serviceName = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'SamplingManager_getSamplingStrategy_args'; - } - - public function read($input) - { - return $this->_read('SamplingManager_getSamplingStrategy_args', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('SamplingManager_getSamplingStrategy_args', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManager_getSamplingStrategy_result.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManager_getSamplingStrategy_result.php deleted file mode 100644 index 79e6dce58..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingManager_getSamplingStrategy_result.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class SamplingManager_getSamplingStrategy_result extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 0 => array( - 'var' => 'success', - 'isRequired' => false, - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Agent\SamplingStrategyResponse', - ), - ); - - /** - * @var \Jaeger\Thrift\Agent\SamplingStrategyResponse - */ - public $success = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'SamplingManager_getSamplingStrategy_result'; - } - - public function read($input) - { - return $this->_read('SamplingManager_getSamplingStrategy_result', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('SamplingManager_getSamplingStrategy_result', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingStrategyResponse.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingStrategyResponse.php deleted file mode 100644 index bc807a57d..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingStrategyResponse.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class SamplingStrategyResponse extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'strategyType', - 'isRequired' => true, - 'type' => TType::I32, - ), - 2 => array( - 'var' => 'probabilisticSampling', - 'isRequired' => false, - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Agent\ProbabilisticSamplingStrategy', - ), - 3 => array( - 'var' => 'rateLimitingSampling', - 'isRequired' => false, - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Agent\RateLimitingSamplingStrategy', - ), - 4 => array( - 'var' => 'operationSampling', - 'isRequired' => false, - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Agent\PerOperationSamplingStrategies', - ), - ); - - /** - * @var int - */ - public $strategyType = null; - /** - * @var \Jaeger\Thrift\Agent\ProbabilisticSamplingStrategy - */ - public $probabilisticSampling = null; - /** - * @var \Jaeger\Thrift\Agent\RateLimitingSamplingStrategy - */ - public $rateLimitingSampling = null; - /** - * @var \Jaeger\Thrift\Agent\PerOperationSamplingStrategies - */ - public $operationSampling = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'SamplingStrategyResponse'; - } - - public function read($input) - { - return $this->_read('SamplingStrategyResponse', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('SamplingStrategyResponse', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingStrategyType.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingStrategyType.php deleted file mode 100644 index c8dff918a..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/SamplingStrategyType.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -final class SamplingStrategyType { - const PROBABILISTIC = 0; - const RATE_LIMITING = 1; - static public $__names = array( - 0 => 'PROBABILISTIC', - 1 => 'RATE_LIMITING', - ); -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/ValidateTraceResponse.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/ValidateTraceResponse.php deleted file mode 100644 index 226f61e80..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/ValidateTraceResponse.php +++ /dev/null @@ -1,65 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class ValidateTraceResponse extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'ok', - 'isRequired' => true, - 'type' => TType::BOOL, - ), - 2 => array( - 'var' => 'traceCount', - 'isRequired' => true, - 'type' => TType::I64, - ), - ); - - /** - * @var bool - */ - public $ok = null; - /** - * @var int - */ - public $traceCount = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'ValidateTraceResponse'; - } - - public function read($input) - { - return $this->_read('ValidateTraceResponse', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('ValidateTraceResponse', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Annotation.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Annotation.php deleted file mode 100644 index e7e48dade..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Annotation.php +++ /dev/null @@ -1,87 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent\Zipkin; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -/** - * An annotation is similar to a log statement. It includes a host field which - * allows these events to be attributed properly, and also aggregatable. - */ -class Annotation extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'timestamp', - 'isRequired' => false, - 'type' => TType::I64, - ), - 2 => array( - 'var' => 'value', - 'isRequired' => false, - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'host', - 'isRequired' => false, - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Agent\Zipkin\Endpoint', - ), - ); - - /** - * Microseconds from epoch. - * - * This value should use the most precise value possible. For example, - * gettimeofday or syncing nanoTime against a tick of currentTimeMillis. - * - * @var int - */ - public $timestamp = null; - /** - * @var string - */ - public $value = null; - /** - * Always the host that recorded the event. By specifying the host you allow - * rollup of all events (such as client requests to a service) by IP address. - * - * @var \Jaeger\Thrift\Agent\Zipkin\Endpoint - */ - public $host = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'Annotation'; - } - - public function read($input) - { - return $this->_read('Annotation', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('Annotation', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/AnnotationType.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/AnnotationType.php deleted file mode 100644 index e21c0b0d8..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/AnnotationType.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent\Zipkin; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -final class AnnotationType { - const BOOL = 0; - const BYTES = 1; - const I16 = 2; - const I32 = 3; - const I64 = 4; - const DOUBLE = 5; - const STRING = 6; - static public $__names = array( - 0 => 'BOOL', - 1 => 'BYTES', - 2 => 'I16', - 3 => 'I32', - 4 => 'I64', - 5 => 'DOUBLE', - 6 => 'STRING', - ); -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/BinaryAnnotation.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/BinaryAnnotation.php deleted file mode 100644 index 806a74831..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/BinaryAnnotation.php +++ /dev/null @@ -1,106 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent\Zipkin; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -/** - * Binary annotations are tags applied to a Span to give it context. For - * example, a binary annotation of "http.uri" could the path to a resource in a - * RPC call. - * - * Binary annotations of type STRING are always queryable, though more a - * historical implementation detail than a structural concern. - * - * Binary annotations can repeat, and vary on the host. Similar to Annotation, - * the host indicates who logged the event. This allows you to tell the - * difference between the client and server side of the same key. For example, - * the key "http.uri" might be different on the client and server side due to - * rewriting, like "/api/v1/myresource" vs "/myresource. Via the host field, - * you can see the different points of view, which often help in debugging. - */ -class BinaryAnnotation extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'key', - 'isRequired' => false, - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'value', - 'isRequired' => false, - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'annotation_type', - 'isRequired' => false, - 'type' => TType::I32, - ), - 4 => array( - 'var' => 'host', - 'isRequired' => false, - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Agent\Zipkin\Endpoint', - ), - ); - - /** - * @var string - */ - public $key = null; - /** - * @var string - */ - public $value = null; - /** - * @var int - */ - public $annotation_type = null; - /** - * The host that recorded tag, which allows you to differentiate between - * multiple tags with the same key. There are two exceptions to this. - * - * When the key is CLIENT_ADDR or SERVER_ADDR, host indicates the source or - * destination of an RPC. This exception allows zipkin to display network - * context of uninstrumented services, or clients such as web browsers. - * - * @var \Jaeger\Thrift\Agent\Zipkin\Endpoint - */ - public $host = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'BinaryAnnotation'; - } - - public function read($input) - { - return $this->_read('BinaryAnnotation', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('BinaryAnnotation', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Constant.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Constant.php deleted file mode 100644 index ebfcebe48..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Constant.php +++ /dev/null @@ -1,246 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent\Zipkin; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -final class Constant extends \Thrift\Type\TConstant { - static protected $CLIENT_SEND; - static protected $CLIENT_RECV; - static protected $SERVER_SEND; - static protected $SERVER_RECV; - static protected $MESSAGE_SEND; - static protected $MESSAGE_RECV; - static protected $WIRE_SEND; - static protected $WIRE_RECV; - static protected $CLIENT_SEND_FRAGMENT; - static protected $CLIENT_RECV_FRAGMENT; - static protected $SERVER_SEND_FRAGMENT; - static protected $SERVER_RECV_FRAGMENT; - static protected $LOCAL_COMPONENT; - static protected $CLIENT_ADDR; - static protected $SERVER_ADDR; - static protected $MESSAGE_ADDR; - - static protected function init_CLIENT_SEND() { - return /** - * The client sent ("cs") a request to a server. There is only one send per - * span. For example, if there's a transport error, each attempt can be logged - * as a WIRE_SEND annotation. - * - * If chunking is involved, each chunk could be logged as a separate - * CLIENT_SEND_FRAGMENT in the same span. - * - * Annotation.host is not the server. It is the host which logged the send - * event, almost always the client. When logging CLIENT_SEND, instrumentation - * should also log the SERVER_ADDR. - */ -"cs"; - } - - static protected function init_CLIENT_RECV() { - return /** - * The client received ("cr") a response from a server. There is only one - * receive per span. For example, if duplicate responses were received, each - * can be logged as a WIRE_RECV annotation. - * - * If chunking is involved, each chunk could be logged as a separate - * CLIENT_RECV_FRAGMENT in the same span. - * - * Annotation.host is not the server. It is the host which logged the receive - * event, almost always the client. The actual endpoint of the server is - * recorded separately as SERVER_ADDR when CLIENT_SEND is logged. - */ -"cr"; - } - - static protected function init_SERVER_SEND() { - return /** - * The server sent ("ss") a response to a client. There is only one response - * per span. If there's a transport error, each attempt can be logged as a - * WIRE_SEND annotation. - * - * Typically, a trace ends with a server send, so the last timestamp of a trace - * is often the timestamp of the root span's server send. - * - * If chunking is involved, each chunk could be logged as a separate - * SERVER_SEND_FRAGMENT in the same span. - * - * Annotation.host is not the client. It is the host which logged the send - * event, almost always the server. The actual endpoint of the client is - * recorded separately as CLIENT_ADDR when SERVER_RECV is logged. - */ -"ss"; - } - - static protected function init_SERVER_RECV() { - return /** - * The server received ("sr") a request from a client. There is only one - * request per span. For example, if duplicate responses were received, each - * can be logged as a WIRE_RECV annotation. - * - * Typically, a trace starts with a server receive, so the first timestamp of a - * trace is often the timestamp of the root span's server receive. - * - * If chunking is involved, each chunk could be logged as a separate - * SERVER_RECV_FRAGMENT in the same span. - * - * Annotation.host is not the client. It is the host which logged the receive - * event, almost always the server. When logging SERVER_RECV, instrumentation - * should also log the CLIENT_ADDR. - */ -"sr"; - } - - static protected function init_MESSAGE_SEND() { - return /** - * Message send ("ms") is a request to send a message to a destination, usually - * a broker. This may be the only annotation in a messaging span. If WIRE_SEND - * exists in the same span, it follows this moment and clarifies delays sending - * the message, such as batching. - * - * Unlike RPC annotations like CLIENT_SEND, messaging spans never share a span - * ID. For example, "ms" should always be the parent of "mr". - * - * Annotation.host is not the destination, it is the host which logged the send - * event: the producer. When annotating MESSAGE_SEND, instrumentation should - * also tag the MESSAGE_ADDR. - */ -"ms"; - } - - static protected function init_MESSAGE_RECV() { - return /** - * A consumer received ("mr") a message from a broker. This may be the only - * annotation in a messaging span. If WIRE_RECV exists in the same span, it - * precedes this moment and clarifies any local queuing delay. - * - * Unlike RPC annotations like SERVER_RECV, messaging spans never share a span - * ID. For example, "mr" should always be a child of "ms" unless it is a root - * span. - * - * Annotation.host is not the broker, it is the host which logged the receive - * event: the consumer. When annotating MESSAGE_RECV, instrumentation should - * also tag the MESSAGE_ADDR. - */ -"mr"; - } - - static protected function init_WIRE_SEND() { - return /** - * Optionally logs an attempt to send a message on the wire. Multiple wire send - * events could indicate network retries. A lag between client or server send - * and wire send might indicate queuing or processing delay. - */ -"ws"; - } - - static protected function init_WIRE_RECV() { - return /** - * Optionally logs an attempt to receive a message from the wire. Multiple wire - * receive events could indicate network retries. A lag between wire receive - * and client or server receive might indicate queuing or processing delay. - */ -"wr"; - } - - static protected function init_CLIENT_SEND_FRAGMENT() { - return /** - * Optionally logs progress of a (CLIENT_SEND, WIRE_SEND). For example, this - * could be one chunk in a chunked request. - */ -"csf"; - } - - static protected function init_CLIENT_RECV_FRAGMENT() { - return /** - * Optionally logs progress of a (CLIENT_RECV, WIRE_RECV). For example, this - * could be one chunk in a chunked response. - */ -"crf"; - } - - static protected function init_SERVER_SEND_FRAGMENT() { - return /** - * Optionally logs progress of a (SERVER_SEND, WIRE_SEND). For example, this - * could be one chunk in a chunked response. - */ -"ssf"; - } - - static protected function init_SERVER_RECV_FRAGMENT() { - return /** - * Optionally logs progress of a (SERVER_RECV, WIRE_RECV). For example, this - * could be one chunk in a chunked request. - */ -"srf"; - } - - static protected function init_LOCAL_COMPONENT() { - return /** - * The value of "lc" is the component or namespace of a local span. - * - * BinaryAnnotation.host adds service context needed to support queries. - * - * Local Component("lc") supports three key features: flagging, query by - * service and filtering Span.name by namespace. - * - * While structurally the same, local spans are fundamentally different than - * RPC spans in how they should be interpreted. For example, zipkin v1 tools - * center on RPC latency and service graphs. Root local-spans are neither - * indicative of critical path RPC latency, nor have impact on the shape of a - * service graph. By flagging with "lc", tools can special-case local spans. - * - * Zipkin v1 Spans are unqueryable unless they can be indexed by service name. - * The only path to a service name is by (Binary)?Annotation.host.serviceName. - * By logging "lc", a local span can be queried even if no other annotations - * are logged. - * - * The value of "lc" is the namespace of Span.name. For example, it might be - * "finatra2", for a span named "bootstrap". "lc" allows you to resolves - * conflicts for the same Span.name, for example "finatra/bootstrap" vs - * "finch/bootstrap". Using local component, you'd search for spans named - * "bootstrap" where "lc=finch" - */ -"lc"; - } - - static protected function init_CLIENT_ADDR() { - return /** - * Indicates a client address ("ca") in a span. Most likely, there's only one. - * Multiple addresses are possible when a client changes its ip or port within - * a span. - */ -"ca"; - } - - static protected function init_SERVER_ADDR() { - return /** - * Indicates a server address ("sa") in a span. Most likely, there's only one. - * Multiple addresses are possible when a client is redirected, or fails to a - * different server ip or port. - */ -"sa"; - } - - static protected function init_MESSAGE_ADDR() { - return /** - * Indicates the remote address of a messaging span, usually the broker. - */ -"ma"; - } -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Endpoint.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Endpoint.php deleted file mode 100644 index 12ff02f96..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Endpoint.php +++ /dev/null @@ -1,108 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent\Zipkin; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -/** - * Indicates the network context of a service recording an annotation with two - * exceptions. - * - * When a BinaryAnnotation, and key is CLIENT_ADDR or SERVER_ADDR, - * the endpoint indicates the source or destination of an RPC. This exception - * allows zipkin to display network context of uninstrumented services, or - * clients such as web browsers. - */ -class Endpoint extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'ipv4', - 'isRequired' => false, - 'type' => TType::I32, - ), - 2 => array( - 'var' => 'port', - 'isRequired' => false, - 'type' => TType::I16, - ), - 3 => array( - 'var' => 'service_name', - 'isRequired' => false, - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'ipv6', - 'isRequired' => false, - 'type' => TType::STRING, - ), - ); - - /** - * IPv4 host address packed into 4 bytes. - * - * Ex for the ip 1.2.3.4, it would be (1 << 24) | (2 << 16) | (3 << 8) | 4 - * - * @var int - */ - public $ipv4 = null; - /** - * IPv4 port - * - * Note: this is to be treated as an unsigned integer, so watch for negatives. - * - * Conventionally, when the port isn't known, port = 0. - * - * @var int - */ - public $port = null; - /** - * Service name in lowercase, such as "memcache" or "zipkin-web" - * - * Conventionally, when the service name isn't known, service_name = "unknown". - * - * @var string - */ - public $service_name = null; - /** - * IPv6 host address packed into 16 bytes. Ex Inet6Address.getBytes() - * - * @var string - */ - public $ipv6 = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'Endpoint'; - } - - public function read($input) - { - return $this->_read('Endpoint', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('Endpoint', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Response.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Response.php deleted file mode 100644 index 88c7f5e5d..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Response.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent\Zipkin; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class Response extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'ok', - 'isRequired' => true, - 'type' => TType::BOOL, - ), - ); - - /** - * @var bool - */ - public $ok = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'Response'; - } - - public function read($input) - { - return $this->_read('Response', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('Response', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Span.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Span.php deleted file mode 100644 index 32a69b645..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Span.php +++ /dev/null @@ -1,190 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent\Zipkin; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -/** - * A trace is a series of spans (often RPC calls) which form a latency tree. - * - * The root span is where trace_id = id and parent_id = Nil. The root span is - * usually the longest interval in the trace, starting with a SERVER_RECV - * annotation and ending with a SERVER_SEND. - */ -class Span extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'trace_id', - 'isRequired' => false, - 'type' => TType::I64, - ), - 3 => array( - 'var' => 'name', - 'isRequired' => false, - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'id', - 'isRequired' => false, - 'type' => TType::I64, - ), - 5 => array( - 'var' => 'parent_id', - 'isRequired' => false, - 'type' => TType::I64, - ), - 6 => array( - 'var' => 'annotations', - 'isRequired' => false, - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Agent\Zipkin\Annotation', - ), - ), - 8 => array( - 'var' => 'binary_annotations', - 'isRequired' => false, - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Agent\Zipkin\BinaryAnnotation', - ), - ), - 9 => array( - 'var' => 'debug', - 'isRequired' => false, - 'type' => TType::BOOL, - ), - 10 => array( - 'var' => 'timestamp', - 'isRequired' => false, - 'type' => TType::I64, - ), - 11 => array( - 'var' => 'duration', - 'isRequired' => false, - 'type' => TType::I64, - ), - 12 => array( - 'var' => 'trace_id_high', - 'isRequired' => false, - 'type' => TType::I64, - ), - ); - - /** - * @var int - */ - public $trace_id = null; - /** - * Span name in lowercase, rpc method for example - * - * Conventionally, when the span name isn't known, name = "unknown". - * - * @var string - */ - public $name = null; - /** - * @var int - */ - public $id = null; - /** - * @var int - */ - public $parent_id = null; - /** - * @var \Jaeger\Thrift\Agent\Zipkin\Annotation[] - */ - public $annotations = null; - /** - * @var \Jaeger\Thrift\Agent\Zipkin\BinaryAnnotation[] - */ - public $binary_annotations = null; - /** - * @var bool - */ - public $debug = false; - /** - * Microseconds from epoch of the creation of this span. - * - * This value should be set directly by instrumentation, using the most - * precise value possible. For example, gettimeofday or syncing nanoTime - * against a tick of currentTimeMillis. - * - * For compatibilty with instrumentation that precede this field, collectors - * or span stores can derive this via Annotation.timestamp. - * For example, SERVER_RECV.timestamp or CLIENT_SEND.timestamp. - * - * This field is optional for compatibility with old data: first-party span - * stores are expected to support this at time of introduction. - * - * @var int - */ - public $timestamp = null; - /** - * Measurement of duration in microseconds, used to support queries. - * - * This value should be set directly, where possible. Doing so encourages - * precise measurement decoupled from problems of clocks, such as skew or NTP - * updates causing time to move backwards. - * - * For compatibilty with instrumentation that precede this field, collectors - * or span stores can derive this by subtracting Annotation.timestamp. - * For example, SERVER_SEND.timestamp - SERVER_RECV.timestamp. - * - * If this field is persisted as unset, zipkin will continue to work, except - * duration query support will be implementation-specific. Similarly, setting - * this field non-atomically is implementation-specific. - * - * This field is i64 vs i32 to support spans longer than 35 minutes. - * - * @var int - */ - public $duration = null; - /** - * Optional unique 8-byte additional identifier for a trace. If non zero, this - * means the trace uses 128 bit traceIds instead of 64 bit. - * - * @var int - */ - public $trace_id_high = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'Span'; - } - - public function read($input) - { - return $this->_read('Span', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('Span', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollectorClient.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollectorClient.php deleted file mode 100644 index 2978675c4..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollectorClient.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent\Zipkin; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class ZipkinCollectorClient implements \Jaeger\Thrift\Agent\Zipkin\ZipkinCollectorIf { - protected $input_ = null; - protected $output_ = null; - - protected $seqid_ = 0; - - public function __construct($input, $output=null) { - $this->input_ = $input; - $this->output_ = $output ? $output : $input; - } - - public function submitZipkinBatch(array $spans) - { - $this->send_submitZipkinBatch($spans); - return $this->recv_submitZipkinBatch(); - } - - public function send_submitZipkinBatch(array $spans) - { - $args = new \Jaeger\Thrift\Agent\Zipkin\ZipkinCollector_submitZipkinBatch_args(); - $args->spans = $spans; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'submitZipkinBatch', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('submitZipkinBatch', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_submitZipkinBatch() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Jaeger\Thrift\Agent\Zipkin\ZipkinCollector_submitZipkinBatch_result', $this->input_->isStrictRead()); - else - { - $rseqid = 0; - $fname = null; - $mtype = 0; - - $this->input_->readMessageBegin($fname, $mtype, $rseqid); - if ($mtype == TMessageType::EXCEPTION) { - $x = new TApplicationException(); - $x->read($this->input_); - $this->input_->readMessageEnd(); - throw $x; - } - $result = new \Jaeger\Thrift\Agent\Zipkin\ZipkinCollector_submitZipkinBatch_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("submitZipkinBatch failed: unknown result"); - } - -} - - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollectorIf.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollectorIf.php deleted file mode 100644 index 83abf8119..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollectorIf.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent\Zipkin; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -interface ZipkinCollectorIf { - /** - * @param \Jaeger\Thrift\Agent\Zipkin\Span[] $spans - * @return \Jaeger\Thrift\Agent\Zipkin\Response[] - */ - public function submitZipkinBatch(array $spans); -} - - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollector_submitZipkinBatch_args.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollector_submitZipkinBatch_args.php deleted file mode 100644 index 24d25b078..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollector_submitZipkinBatch_args.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent\Zipkin; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class ZipkinCollector_submitZipkinBatch_args extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'spans', - 'isRequired' => false, - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Agent\Zipkin\Span', - ), - ), - ); - - /** - * @var \Jaeger\Thrift\Agent\Zipkin\Span[] - */ - public $spans = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'ZipkinCollector_submitZipkinBatch_args'; - } - - public function read($input) - { - return $this->_read('ZipkinCollector_submitZipkinBatch_args', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('ZipkinCollector_submitZipkinBatch_args', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollector_submitZipkinBatch_result.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollector_submitZipkinBatch_result.php deleted file mode 100644 index faf165446..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/ZipkinCollector_submitZipkinBatch_result.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php -namespace Jaeger\Thrift\Agent\Zipkin; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class ZipkinCollector_submitZipkinBatch_result extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 0 => array( - 'var' => 'success', - 'isRequired' => false, - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Agent\Zipkin\Response', - ), - ), - ); - - /** - * @var \Jaeger\Thrift\Agent\Zipkin\Response[] - */ - public $success = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'ZipkinCollector_submitZipkinBatch_result'; - } - - public function read($input) - { - return $this->_read('ZipkinCollector_submitZipkinBatch_result', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('ZipkinCollector_submitZipkinBatch_result', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Batch.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Batch.php deleted file mode 100644 index 56e9e5206..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Batch.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php -namespace Jaeger\Thrift; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class Batch extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'process', - 'isRequired' => true, - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Process', - ), - 2 => array( - 'var' => 'spans', - 'isRequired' => true, - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Span', - ), - ), - ); - - /** - * @var \Jaeger\Thrift\Process - */ - public $process = null; - /** - * @var \Jaeger\Thrift\Span[] - */ - public $spans = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'Batch'; - } - - public function read($input) - { - return $this->_read('Batch', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('Batch', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/BatchSubmitResponse.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/BatchSubmitResponse.php deleted file mode 100644 index 7ddc25eb5..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/BatchSubmitResponse.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -namespace Jaeger\Thrift; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class BatchSubmitResponse extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'ok', - 'isRequired' => true, - 'type' => TType::BOOL, - ), - ); - - /** - * @var bool - */ - public $ok = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'BatchSubmitResponse'; - } - - public function read($input) - { - return $this->_read('BatchSubmitResponse', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('BatchSubmitResponse', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/CollectorClient.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/CollectorClient.php deleted file mode 100644 index e3c6e14c1..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/CollectorClient.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php -namespace Jaeger\Thrift; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class CollectorClient implements \Jaeger\Thrift\CollectorIf { - protected $input_ = null; - protected $output_ = null; - - protected $seqid_ = 0; - - public function __construct($input, $output=null) { - $this->input_ = $input; - $this->output_ = $output ? $output : $input; - } - - public function submitBatches(array $batches) - { - $this->send_submitBatches($batches); - return $this->recv_submitBatches(); - } - - public function send_submitBatches(array $batches) - { - $args = new \Jaeger\Thrift\Collector_submitBatches_args(); - $args->batches = $batches; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'submitBatches', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('submitBatches', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_submitBatches() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Jaeger\Thrift\Collector_submitBatches_result', $this->input_->isStrictRead()); - else - { - $rseqid = 0; - $fname = null; - $mtype = 0; - - $this->input_->readMessageBegin($fname, $mtype, $rseqid); - if ($mtype == TMessageType::EXCEPTION) { - $x = new TApplicationException(); - $x->read($this->input_); - $this->input_->readMessageEnd(); - throw $x; - } - $result = new \Jaeger\Thrift\Collector_submitBatches_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("submitBatches failed: unknown result"); - } - -} - - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/CollectorIf.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/CollectorIf.php deleted file mode 100644 index da4f023ec..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/CollectorIf.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php -namespace Jaeger\Thrift; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -interface CollectorIf { - /** - * @param \Jaeger\Thrift\Batch[] $batches - * @return \Jaeger\Thrift\BatchSubmitResponse[] - */ - public function submitBatches(array $batches); -} - - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Collector_submitBatches_args.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Collector_submitBatches_args.php deleted file mode 100644 index 014e3720d..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Collector_submitBatches_args.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php -namespace Jaeger\Thrift; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class Collector_submitBatches_args extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'batches', - 'isRequired' => false, - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Batch', - ), - ), - ); - - /** - * @var \Jaeger\Thrift\Batch[] - */ - public $batches = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'Collector_submitBatches_args'; - } - - public function read($input) - { - return $this->_read('Collector_submitBatches_args', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('Collector_submitBatches_args', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Collector_submitBatches_result.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Collector_submitBatches_result.php deleted file mode 100644 index aae083707..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Collector_submitBatches_result.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php -namespace Jaeger\Thrift; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class Collector_submitBatches_result extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 0 => array( - 'var' => 'success', - 'isRequired' => false, - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\BatchSubmitResponse', - ), - ), - ); - - /** - * @var \Jaeger\Thrift\BatchSubmitResponse[] - */ - public $success = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'Collector_submitBatches_result'; - } - - public function read($input) - { - return $this->_read('Collector_submitBatches_result', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('Collector_submitBatches_result', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/Downstream.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/Downstream.php deleted file mode 100644 index 92b269aa6..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/Downstream.php +++ /dev/null @@ -1,102 +0,0 @@ -<?php -namespace Jaeger\Thrift\Crossdock; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class Downstream extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'serviceName', - 'isRequired' => true, - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'serverRole', - 'isRequired' => true, - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'host', - 'isRequired' => true, - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'port', - 'isRequired' => true, - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'transport', - 'isRequired' => true, - 'type' => TType::I32, - ), - 6 => array( - 'var' => 'downstream', - 'isRequired' => false, - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Crossdock\Downstream', - ), - ); - - /** - * @var string - */ - public $serviceName = null; - /** - * @var string - */ - public $serverRole = null; - /** - * @var string - */ - public $host = null; - /** - * @var string - */ - public $port = null; - /** - * @var int - */ - public $transport = null; - /** - * @var \Jaeger\Thrift\Crossdock\Downstream - */ - public $downstream = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'Downstream'; - } - - public function read($input) - { - return $this->_read('Downstream', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('Downstream', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/JoinTraceRequest.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/JoinTraceRequest.php deleted file mode 100644 index 39e6242b7..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/JoinTraceRequest.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php -namespace Jaeger\Thrift\Crossdock; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class JoinTraceRequest extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'serverRole', - 'isRequired' => true, - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'downstream', - 'isRequired' => false, - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Crossdock\Downstream', - ), - ); - - /** - * @var string - */ - public $serverRole = null; - /** - * @var \Jaeger\Thrift\Crossdock\Downstream - */ - public $downstream = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'JoinTraceRequest'; - } - - public function read($input) - { - return $this->_read('JoinTraceRequest', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('JoinTraceRequest', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/ObservedSpan.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/ObservedSpan.php deleted file mode 100644 index d60331851..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/ObservedSpan.php +++ /dev/null @@ -1,74 +0,0 @@ -<?php -namespace Jaeger\Thrift\Crossdock; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class ObservedSpan extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'traceId', - 'isRequired' => true, - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'sampled', - 'isRequired' => true, - 'type' => TType::BOOL, - ), - 3 => array( - 'var' => 'baggage', - 'isRequired' => true, - 'type' => TType::STRING, - ), - ); - - /** - * @var string - */ - public $traceId = null; - /** - * @var bool - */ - public $sampled = null; - /** - * @var string - */ - public $baggage = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'ObservedSpan'; - } - - public function read($input) - { - return $this->_read('ObservedSpan', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('ObservedSpan', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/StartTraceRequest.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/StartTraceRequest.php deleted file mode 100644 index 50b9c6668..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/StartTraceRequest.php +++ /dev/null @@ -1,84 +0,0 @@ -<?php -namespace Jaeger\Thrift\Crossdock; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class StartTraceRequest extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'serverRole', - 'isRequired' => true, - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'sampled', - 'isRequired' => true, - 'type' => TType::BOOL, - ), - 3 => array( - 'var' => 'baggage', - 'isRequired' => true, - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'downstream', - 'isRequired' => true, - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Crossdock\Downstream', - ), - ); - - /** - * @var string - */ - public $serverRole = null; - /** - * @var bool - */ - public $sampled = null; - /** - * @var string - */ - public $baggage = null; - /** - * @var \Jaeger\Thrift\Crossdock\Downstream - */ - public $downstream = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'StartTraceRequest'; - } - - public function read($input) - { - return $this->_read('StartTraceRequest', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('StartTraceRequest', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TraceResponse.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TraceResponse.php deleted file mode 100644 index 107d4e26d..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TraceResponse.php +++ /dev/null @@ -1,82 +0,0 @@ -<?php -namespace Jaeger\Thrift\Crossdock; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -/** - * Each server must include the information about the span it observed. - * It can only be omitted from the response if notImplementedError field is not empty. - * If the server was instructed to make a downstream call, it must embed the - * downstream response in its own response. - */ -class TraceResponse extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'span', - 'isRequired' => false, - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Crossdock\ObservedSpan', - ), - 2 => array( - 'var' => 'downstream', - 'isRequired' => false, - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Crossdock\TraceResponse', - ), - 3 => array( - 'var' => 'notImplementedError', - 'isRequired' => true, - 'type' => TType::STRING, - ), - ); - - /** - * @var \Jaeger\Thrift\Crossdock\ObservedSpan - */ - public $span = null; - /** - * @var \Jaeger\Thrift\Crossdock\TraceResponse - */ - public $downstream = null; - /** - * @var string - */ - public $notImplementedError = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'TraceResponse'; - } - - public function read($input) - { - return $this->_read('TraceResponse', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('TraceResponse', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedServiceClient.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedServiceClient.php deleted file mode 100644 index 2fd8b4fc9..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedServiceClient.php +++ /dev/null @@ -1,134 +0,0 @@ -<?php -namespace Jaeger\Thrift\Crossdock; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class TracedServiceClient implements \Jaeger\Thrift\Crossdock\TracedServiceIf { - protected $input_ = null; - protected $output_ = null; - - protected $seqid_ = 0; - - public function __construct($input, $output=null) { - $this->input_ = $input; - $this->output_ = $output ? $output : $input; - } - - public function startTrace(\Jaeger\Thrift\Crossdock\StartTraceRequest $request) - { - $this->send_startTrace($request); - return $this->recv_startTrace(); - } - - public function send_startTrace(\Jaeger\Thrift\Crossdock\StartTraceRequest $request) - { - $args = new \Jaeger\Thrift\Crossdock\TracedService_startTrace_args(); - $args->request = $request; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'startTrace', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('startTrace', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_startTrace() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Jaeger\Thrift\Crossdock\TracedService_startTrace_result', $this->input_->isStrictRead()); - else - { - $rseqid = 0; - $fname = null; - $mtype = 0; - - $this->input_->readMessageBegin($fname, $mtype, $rseqid); - if ($mtype == TMessageType::EXCEPTION) { - $x = new TApplicationException(); - $x->read($this->input_); - $this->input_->readMessageEnd(); - throw $x; - } - $result = new \Jaeger\Thrift\Crossdock\TracedService_startTrace_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("startTrace failed: unknown result"); - } - - public function joinTrace(\Jaeger\Thrift\Crossdock\JoinTraceRequest $request) - { - $this->send_joinTrace($request); - return $this->recv_joinTrace(); - } - - public function send_joinTrace(\Jaeger\Thrift\Crossdock\JoinTraceRequest $request) - { - $args = new \Jaeger\Thrift\Crossdock\TracedService_joinTrace_args(); - $args->request = $request; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'joinTrace', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('joinTrace', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_joinTrace() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Jaeger\Thrift\Crossdock\TracedService_joinTrace_result', $this->input_->isStrictRead()); - else - { - $rseqid = 0; - $fname = null; - $mtype = 0; - - $this->input_->readMessageBegin($fname, $mtype, $rseqid); - if ($mtype == TMessageType::EXCEPTION) { - $x = new TApplicationException(); - $x->read($this->input_); - $this->input_->readMessageEnd(); - throw $x; - } - $result = new \Jaeger\Thrift\Crossdock\TracedService_joinTrace_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("joinTrace failed: unknown result"); - } - -} - - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedServiceIf.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedServiceIf.php deleted file mode 100644 index e2dd9a8eb..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedServiceIf.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php -namespace Jaeger\Thrift\Crossdock; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -interface TracedServiceIf { - /** - * @param \Jaeger\Thrift\Crossdock\StartTraceRequest $request - * @return \Jaeger\Thrift\Crossdock\TraceResponse Each server must include the information about the span it observed. - * It can only be omitted from the response if notImplementedError field is not empty. - * If the server was instructed to make a downstream call, it must embed the - * downstream response in its own response. - * - */ - public function startTrace(\Jaeger\Thrift\Crossdock\StartTraceRequest $request); - /** - * @param \Jaeger\Thrift\Crossdock\JoinTraceRequest $request - * @return \Jaeger\Thrift\Crossdock\TraceResponse Each server must include the information about the span it observed. - * It can only be omitted from the response if notImplementedError field is not empty. - * If the server was instructed to make a downstream call, it must embed the - * downstream response in its own response. - * - */ - public function joinTrace(\Jaeger\Thrift\Crossdock\JoinTraceRequest $request); -} - - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_joinTrace_args.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_joinTrace_args.php deleted file mode 100644 index fb82b43c7..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_joinTrace_args.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -namespace Jaeger\Thrift\Crossdock; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class TracedService_joinTrace_args extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'request', - 'isRequired' => false, - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Crossdock\JoinTraceRequest', - ), - ); - - /** - * @var \Jaeger\Thrift\Crossdock\JoinTraceRequest - */ - public $request = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'TracedService_joinTrace_args'; - } - - public function read($input) - { - return $this->_read('TracedService_joinTrace_args', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('TracedService_joinTrace_args', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_joinTrace_result.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_joinTrace_result.php deleted file mode 100644 index 26ebd7124..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_joinTrace_result.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -namespace Jaeger\Thrift\Crossdock; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class TracedService_joinTrace_result extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 0 => array( - 'var' => 'success', - 'isRequired' => false, - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Crossdock\TraceResponse', - ), - ); - - /** - * @var \Jaeger\Thrift\Crossdock\TraceResponse - */ - public $success = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'TracedService_joinTrace_result'; - } - - public function read($input) - { - return $this->_read('TracedService_joinTrace_result', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('TracedService_joinTrace_result', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_startTrace_args.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_startTrace_args.php deleted file mode 100644 index cabc260ea..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_startTrace_args.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -namespace Jaeger\Thrift\Crossdock; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class TracedService_startTrace_args extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'request', - 'isRequired' => false, - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Crossdock\StartTraceRequest', - ), - ); - - /** - * @var \Jaeger\Thrift\Crossdock\StartTraceRequest - */ - public $request = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'TracedService_startTrace_args'; - } - - public function read($input) - { - return $this->_read('TracedService_startTrace_args', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('TracedService_startTrace_args', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_startTrace_result.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_startTrace_result.php deleted file mode 100644 index f4b114e64..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/TracedService_startTrace_result.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -namespace Jaeger\Thrift\Crossdock; -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class TracedService_startTrace_result extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 0 => array( - 'var' => 'success', - 'isRequired' => false, - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Crossdock\TraceResponse', - ), - ); - - /** - * @var \Jaeger\Thrift\Crossdock\TraceResponse - */ - public $success = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'TracedService_startTrace_result'; - } - - public function read($input) - { - return $this->_read('TracedService_startTrace_result', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('TracedService_startTrace_result', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/Transport.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/Transport.php deleted file mode 100644 index 1b71e686b..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Crossdock/Transport.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php -namespace Jaeger\Thrift\Crossdock; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -final class Transport { - const HTTP = 0; - const TCHANNEL = 1; - const DUMMY = 2; - static public $__names = array( - 0 => 'HTTP', - 1 => 'TCHANNEL', - 2 => 'DUMMY', - ); -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Log.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Log.php deleted file mode 100644 index 809a92d7c..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Log.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php -namespace Jaeger\Thrift; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class Log extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'timestamp', - 'isRequired' => true, - 'type' => TType::I64, - ), - 2 => array( - 'var' => 'fields', - 'isRequired' => true, - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Tag', - ), - ), - ); - - /** - * @var int - */ - public $timestamp = null; - /** - * @var \Jaeger\Thrift\Tag[] - */ - public $fields = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'Log'; - } - - public function read($input) - { - return $this->_read('Log', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('Log', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Process.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Process.php deleted file mode 100644 index 3b925220a..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Process.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php -namespace Jaeger\Thrift; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class Process extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'serviceName', - 'isRequired' => true, - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tags', - 'isRequired' => false, - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Tag', - ), - ), - ); - - /** - * @var string - */ - public $serviceName = null; - /** - * @var \Jaeger\Thrift\Tag[] - */ - public $tags = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'Process'; - } - - public function read($input) - { - return $this->_read('Process', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('Process', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Span.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Span.php deleted file mode 100644 index cff0c324d..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Span.php +++ /dev/null @@ -1,161 +0,0 @@ -<?php -namespace Jaeger\Thrift; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class Span extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'traceIdLow', - 'isRequired' => true, - 'type' => TType::I64, - ), - 2 => array( - 'var' => 'traceIdHigh', - 'isRequired' => true, - 'type' => TType::I64, - ), - 3 => array( - 'var' => 'spanId', - 'isRequired' => true, - 'type' => TType::I64, - ), - 4 => array( - 'var' => 'parentSpanId', - 'isRequired' => true, - 'type' => TType::I64, - ), - 5 => array( - 'var' => 'operationName', - 'isRequired' => true, - 'type' => TType::STRING, - ), - 6 => array( - 'var' => 'references', - 'isRequired' => false, - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\SpanRef', - ), - ), - 7 => array( - 'var' => 'flags', - 'isRequired' => true, - 'type' => TType::I32, - ), - 8 => array( - 'var' => 'startTime', - 'isRequired' => true, - 'type' => TType::I64, - ), - 9 => array( - 'var' => 'duration', - 'isRequired' => true, - 'type' => TType::I64, - ), - 10 => array( - 'var' => 'tags', - 'isRequired' => false, - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Tag', - ), - ), - 11 => array( - 'var' => 'logs', - 'isRequired' => false, - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Log', - ), - ), - ); - - /** - * @var int - */ - public $traceIdLow = null; - /** - * @var int - */ - public $traceIdHigh = null; - /** - * @var int - */ - public $spanId = null; - /** - * @var int - */ - public $parentSpanId = null; - /** - * @var string - */ - public $operationName = null; - /** - * @var \Jaeger\Thrift\SpanRef[] - */ - public $references = null; - /** - * @var int - */ - public $flags = null; - /** - * @var int - */ - public $startTime = null; - /** - * @var int - */ - public $duration = null; - /** - * @var \Jaeger\Thrift\Tag[] - */ - public $tags = null; - /** - * @var \Jaeger\Thrift\Log[] - */ - public $logs = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'Span'; - } - - public function read($input) - { - return $this->_read('Span', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('Span', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/SpanRef.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/SpanRef.php deleted file mode 100644 index cb5ee78db..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/SpanRef.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php -namespace Jaeger\Thrift; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class SpanRef extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'refType', - 'isRequired' => true, - 'type' => TType::I32, - ), - 2 => array( - 'var' => 'traceIdLow', - 'isRequired' => true, - 'type' => TType::I64, - ), - 3 => array( - 'var' => 'traceIdHigh', - 'isRequired' => true, - 'type' => TType::I64, - ), - 4 => array( - 'var' => 'spanId', - 'isRequired' => true, - 'type' => TType::I64, - ), - ); - - /** - * @var int - */ - public $refType = null; - /** - * @var int - */ - public $traceIdLow = null; - /** - * @var int - */ - public $traceIdHigh = null; - /** - * @var int - */ - public $spanId = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'SpanRef'; - } - - public function read($input) - { - return $this->_read('SpanRef', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('SpanRef', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/SpanRefType.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/SpanRefType.php deleted file mode 100644 index d6d6f20c3..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/SpanRefType.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php -namespace Jaeger\Thrift; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -final class SpanRefType { - const CHILD_OF = 0; - const FOLLOWS_FROM = 1; - static public $__names = array( - 0 => 'CHILD_OF', - 1 => 'FOLLOWS_FROM', - ); -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Tag.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Tag.php deleted file mode 100644 index 06af59939..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Tag.php +++ /dev/null @@ -1,110 +0,0 @@ -<?php -namespace Jaeger\Thrift; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class Tag extends TBase { - static $isValidate = false; - - static $_TSPEC = array( - 1 => array( - 'var' => 'key', - 'isRequired' => true, - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'vType', - 'isRequired' => true, - 'type' => TType::I32, - ), - 3 => array( - 'var' => 'vStr', - 'isRequired' => false, - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'vDouble', - 'isRequired' => false, - 'type' => TType::DOUBLE, - ), - 5 => array( - 'var' => 'vBool', - 'isRequired' => false, - 'type' => TType::BOOL, - ), - 6 => array( - 'var' => 'vLong', - 'isRequired' => false, - 'type' => TType::I64, - ), - 7 => array( - 'var' => 'vBinary', - 'isRequired' => false, - 'type' => TType::STRING, - ), - ); - - /** - * @var string - */ - public $key = null; - /** - * @var int - */ - public $vType = null; - /** - * @var string - */ - public $vStr = null; - /** - * @var double - */ - public $vDouble = null; - /** - * @var bool - */ - public $vBool = null; - /** - * @var int - */ - public $vLong = null; - /** - * @var string - */ - public $vBinary = null; - - public function __construct($vals=null) { - if (is_array($vals)) { - parent::__construct(self::$_TSPEC, $vals); - } - } - - public function getName() { - return 'Tag'; - } - - public function read($input) - { - return $this->_read('Tag', self::$_TSPEC, $input); - } - - public function write($output) { - return $this->_write('Tag', self::$_TSPEC, $output); - } - -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/TagType.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/TagType.php deleted file mode 100644 index 3b1f69f9f..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/TagType.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php -namespace Jaeger\Thrift; - -/** - * Autogenerated by Thrift Compiler (0.11.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -final class TagType { - const STRING = 0; - const DOUBLE = 1; - const BOOL = 2; - const LONG = 3; - const BINARY = 4; - static public $__names = array( - 0 => 'STRING', - 1 => 'DOUBLE', - 2 => 'BOOL', - 3 => 'LONG', - 4 => 'BINARY', - ); -} - diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ThriftUdpTransport.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ThriftUdpTransport.php deleted file mode 100644 index babc689dc..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ThriftUdpTransport.php +++ /dev/null @@ -1,151 +0,0 @@ -<?php - -namespace Jaeger; - -use Psr\Log\LoggerInterface; -use Psr\Log\NullLogger; -use Thrift\Transport\TTransport; - -class ThriftUdpTransport extends TTransport -{ - private $socket; - - /** - * @var string - */ - private $host; - - /** - * @var int - */ - private $port; - - /** - * @var LoggerInterface - */ - private $logger; - - /** - * @var Config - */ - private $config; - - /** - * ThriftUdpTransport constructor. - * @param string $host - * @param int $port - * @param LoggerInterface $logger - */ - public function __construct(string $host, int $port, LoggerInterface $logger = null, Config $config = null) - { - $this->setLogger($logger); - - $this->config = $config; - - $ipProtocol = $this->ipProtocolVersion(); - $this->socket = $this->createSocket($ipProtocol); - - $this->host = $host; - $this->port = $port; - } - - protected function setLogger($logger) - { - $this->logger = $logger ?? new NullLogger(); - } - - protected function createSocket(string $ipProtocol) - { - $socketDomain = AF_INET; - if ($ipProtocol === Config::IPV6) { - $socketDomain = AF_INET6; - } - - $socket = @socket_create($socketDomain, SOCK_DGRAM, SOL_UDP); - if ($socket === false) { - $this->handleSocketError("socket_create failed"); - } - return $socket; - } - - protected function ipProtocolVersion() - { - if (!empty($this->config)) { - return $this->config->ipProtocolVersion(); - } - return ""; - } - - /** - * Whether this transport is open. - * - * @return boolean true if open - */ - public function isOpen() - { - return $this->socket !== null; - } - - /** - * Open the transport for reading/writing - */ - public function open() - { - $ok = @socket_connect($this->socket, $this->host, $this->port); - if ($ok === false) { - $this->handleSocketError('socket_connect failed'); - } - } - - /** - * Close the transport. - */ - public function close() - { - if (is_null($this->socket)) { - $this->logger->warning("can't close empty socket"); - return ; - } - - @socket_close($this->socket); - $this->socket = null; - } - - /** - * Read some data into the array. - * - * @todo - * - * @param int $len How much to read - * @return string The data that has been read - */ - public function read($len) - { - } - - /** - * Writes the given data out. - * - * @param string $buf The data to write - */ - public function write($buf) - { - if (!$this->isOpen()) { - $this->logger->warning('transport is closed'); - return ; - } - - $ok = @socket_write($this->socket, $buf); - if ($ok === false) { - $this->handleSocketError("socket_write failed"); - } - } - - public function handleSocketError($msg) - { - $errorCode = socket_last_error($this->socket); - $errorMsg = socket_strerror($errorCode); - - $this->logger->warning(sprintf('%s: [code - %d] %s', $msg, $errorCode, $errorMsg)); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Tracer.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Tracer.php deleted file mode 100644 index bb0649a0b..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Tracer.php +++ /dev/null @@ -1,420 +0,0 @@ -<?php - -namespace Jaeger; - -use Exception; -use OpenTracing\Scope as OTScope; -use OpenTracing\Span as OTSpan; -use OpenTracing\UnsupportedFormatException; -use Psr\Log\LoggerInterface; -use Psr\Log\NullLogger; -use Jaeger\Codec\BinaryCodec; -use Jaeger\Codec\CodecInterface; -use Jaeger\Codec\TextCodec; -use Jaeger\Codec\ZipkinCodec; -use Jaeger\Reporter\ReporterInterface; -use Jaeger\Sampler\SamplerInterface; -use OpenTracing\Tracer as OTTracer; -use OpenTracing\SpanContext as OTSpanContext; -use OpenTracing\Reference; -use OpenTracing\StartSpanOptions; -use OpenTracing\Exceptions\UnsupportedFormat; -use const OpenTracing\Formats\BINARY; -use const OpenTracing\Formats\HTTP_HEADERS; -use const OpenTracing\Formats\TEXT_MAP; -use const OpenTracing\Tags\SPAN_KIND; -use const OpenTracing\Tags\SPAN_KIND_RPC_SERVER; -use OpenTracing\ScopeManager as OTScopeManager; - -class Tracer implements OTTracer -{ - /** - * @var string - */ - private $serviceName; - - /** - * @var ReporterInterface - */ - private $reporter; - - /** - * @var SamplerInterface - */ - private $sampler; - - /** - * @var string - */ - private $ipAddress; - - /** - * @var string - */ - private $debugIdHeader; - - /** - * @var CodecInterface[] - */ - private $codecs; - - /** - * @var LoggerInterface - */ - private $logger; - - /** - * @var bool - */ - private $oneSpanPerRpc; - - /** - * @var string[] - */ - private $tags; - - /** - * @var ScopeManager - */ - private $scopeManager; - - /** - * Tracer constructor. - * @param string $serviceName - * @param ReporterInterface $reporter - * @param SamplerInterface $sampler - * @param bool $oneSpanPerRpc - * @param LoggerInterface|null $logger - * @param ScopeManager|null $scopeManager - * @param string $traceIdHeader - * @param string $baggageHeaderPrefix - * @param string $debugIdHeader - * @param array|null $tags - */ - public function __construct( - $serviceName, - ReporterInterface $reporter, - SamplerInterface $sampler, - $oneSpanPerRpc = true, - LoggerInterface $logger = null, - ScopeManager $scopeManager = null, - $traceIdHeader = TRACE_ID_HEADER, - $baggageHeaderPrefix = BAGGAGE_HEADER_PREFIX, - $debugIdHeader = DEBUG_ID_HEADER_KEY, - $tags = null - ) { - $this->serviceName = $serviceName; - $this->reporter = $reporter; - $this->sampler = $sampler; - $this->oneSpanPerRpc = $oneSpanPerRpc; - - $this->logger = $logger ?? new NullLogger(); - $this->scopeManager = $scopeManager ?? new ScopeManager(); - - $this->debugIdHeader = $debugIdHeader; - - $this->codecs = [ - TEXT_MAP => new TextCodec( - false, - $traceIdHeader, - $baggageHeaderPrefix, - $debugIdHeader - ), - HTTP_HEADERS => new TextCodec( - true, - $traceIdHeader, - $baggageHeaderPrefix, - $debugIdHeader - ), - BINARY => new BinaryCodec(), - ZIPKIN_SPAN_FORMAT => new ZipkinCodec(), - ]; - - $this->tags = [ - JAEGER_VERSION_TAG_KEY => JAEGER_CLIENT_VERSION, - ]; - if ($tags !== null) { - $this->tags = array_merge($this->tags, $tags); - } - - $hostname = $this->getHostName(); - $this->ipAddress = $this->getHostByName($hostname); - - if (!empty($hostname)) { - $this->tags[JAEGER_HOSTNAME_TAG_KEY] = $hostname; - } - } - - /** - * @return string[] - */ - public function getTags(): array - { - return $this->tags; - } - - /** - * {@inheritdoc} - */ - public function startSpan(string $operationName, $options = []): OTSpan - { - if (!($options instanceof StartSpanOptions)) { - $options = StartSpanOptions::create($options); - } - - $parent = $this->getParentSpanContext($options); - $tags = $options->getTags(); - - $rpcServer = ($tags[SPAN_KIND] ?? null) == SPAN_KIND_RPC_SERVER; - - if ($parent == null || $parent->isDebugIdContainerOnly()) { - $traceId = $this->randomId(); - $spanId = $traceId; - $parentId = null; - $flags = 0; - $baggage = null; - if ($parent == null) { - list($sampled, $samplerTags) = $this->sampler->isSampled($traceId, $operationName); - if ($sampled) { - $flags = SAMPLED_FLAG; - $tags = $tags ?? []; - foreach ($samplerTags as $key => $value) { - $tags[$key] = $value; - } - } - } else { // have debug id - $flags = SAMPLED_FLAG | DEBUG_FLAG; - $tags = $tags ?? []; - $tags[$this->debugIdHeader] = $parent->getDebugId(); - } - } else { - $traceId = $parent->getTraceId(); - if ($rpcServer && $this->oneSpanPerRpc) { - // Zipkin-style one-span-per-RPC - $spanId = $parent->getSpanId(); - $parentId = $parent->getParentId(); - } else { - $spanId = $this->randomId(); - $parentId = $parent->getSpanId(); - } - - $flags = $parent->getFlags(); - $baggage = $parent->getBaggage(); - } - - $spanContext = new SpanContext( - $traceId, - $spanId, - $parentId, - $flags, - $baggage - ); - - $span = new Span( - $spanContext, - $this, - $operationName, - $tags ?? [], - $options->getStartTime() - ); - - $mergedTags = array_merge($this->tags, $tags); - $span->setTags($mergedTags); - - return $span; - } - - /** - * {@inheritdoc} - * - * @param SpanContext $spanContext - * @param string $format - * @param mixed $carrier - * @return void - * - * @throws UnsupportedFormat - */ - public function inject(OTSpanContext $spanContext, string $format, &$carrier): void - { - if ($spanContext instanceof SpanContext) { - $codec = $this->codecs[$format] ?? null; - - if ($codec == null) { - throw UnsupportedFormatException::forFormat(is_scalar($format) ? $format : gettype($format)); - } - - - $codec->inject($spanContext, $carrier); - return; - } - - $message = sprintf( - 'Invalid span context. Expected Jaeger\SpanContext, got %s.', - is_object($spanContext) ? get_class($spanContext) : gettype($spanContext) - ); - - $this->logger->warning($message); - } - - /** - * {@inheritdoc} - * - * @param mixed $carrier - * @return SpanContext|null - * - * @throws UnsupportedFormat - */ - public function extract(string $format, $carrier): ?OTSpanContext - { - $codec = $this->codecs[$format] ?? null; - - if ($codec == null) { - throw UnsupportedFormatException::forFormat(is_scalar($format) ? $format : gettype($format)); - } - - try { - return $codec->extract($carrier); - } catch (\Throwable $e) { - $this->logger->warning($e->getMessage()); - - return null; - } - } - - /** - * {@inheritdoc} - */ - public function flush(): void - { - $this->sampler->close(); - $this->reporter->close(); - } - - public function reportSpan(Span $span) - { - $this->reporter->reportSpan($span); - } - - /** - * {@inheritdoc} - */ - public function getScopeManager(): OTScopeManager - { - return $this->scopeManager; - } - - /** - * {@inheritdoc} - */ - public function getActiveSpan(): ?OTSpan - { - $activeScope = $this->getScopeManager()->getActive(); - if ($activeScope === null) { - return null; - } - - return $activeScope->getSpan(); - } - - /** - * {@inheritdoc} - */ - public function startActiveSpan(string $operationName, $options = []): OTScope - { - if (!$options instanceof StartSpanOptions) { - $options = StartSpanOptions::create($options); - } - - if (!$this->getParentSpanContext($options) && $this->getActiveSpan() !== null) { - $parent = $this->getActiveSpan()->getContext(); - $options = $options->withParent($parent); - } - - $span = $this->startSpan($operationName, $options); - $scope = $this->scopeManager->activate($span, $options->shouldFinishSpanOnClose()); - - return $scope; - } - - /** - * Gets parent span context (if any). - * - * @param StartSpanOptions $options - * @return null|OTSpanContext|SpanContext - */ - private function getParentSpanContext(StartSpanOptions $options) - { - $references = $options->getReferences(); - foreach ($references as $ref) { - if ($ref->isType(Reference::CHILD_OF)) { - return $ref->getSpanContext(); - } - } - - return null; - } - - /** - * @return string - * @throws Exception - */ - private function randomId(): string - { - return (string) random_int(0, PHP_INT_MAX); - } - - /** - * The facade to get the host name. - * - * @return string - */ - protected function getHostName() - { - return gethostname(); - } - - /** - * The facade to get IPv4 address corresponding to a given Internet host name. - * - * NOTE: DNS Resolution may take too long, and during this time your script is NOT being executed. - * - * @param string|null $hostname - * @return string - */ - protected function getHostByName($hostname) - { - if (empty($hostname)) { - $this->logger->error('Unable to determine host name'); - return '127.0.0.1'; - } - - return gethostbyname($hostname); - } - - /** - * @param SamplerInterface $sampler - * @return $this - */ - public function setSampler(SamplerInterface $sampler) - { - $this->sampler = $sampler; - - return $this; - } - - /** - * @return string - */ - public function getServiceName() - { - return $this->serviceName; - } - - /** - * @return string - */ - public function getIpAddress() - { - return $this->ipAddress; - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Util/RateLimiter.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Util/RateLimiter.php deleted file mode 100644 index d767ad40f..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Util/RateLimiter.php +++ /dev/null @@ -1,128 +0,0 @@ -<?php - -namespace Jaeger\Util; - -use Psr\Cache\CacheItemInterface; -use Psr\Cache\CacheItemPoolInterface; - -class RateLimiter -{ - /** - * @var CacheItemPoolInterface - */ - private $cache; - - /** - * @var CacheItemInterface - */ - private $balance; - - /** - * @var CacheItemInterface - */ - private $lastTick; - - /** - * @var float - */ - private $creditsPerNanosecond = 0; - - /** - * @var float - */ - private $maxBalance = 0; - - /** - * RateLimiter constructor. - * - * @param CacheItemPoolInterface $cache - * @param string $currentBalanceKey key of current balance value in $cache - * @param string $lastTickKey key of last tick value in $cache - * @throws \Psr\Cache\InvalidArgumentException - */ - public function __construct( - CacheItemPoolInterface $cache, - string $currentBalanceKey, - string $lastTickKey - ) { - $this->cache = $cache; - $this->balance = $this->cache->getItem($currentBalanceKey); - $this->lastTick = $this->cache->getItem($lastTickKey); - } - - /** - * @param $itemCost - * @return bool - */ - public function checkCredit($itemCost) - { - if (!$this->creditsPerNanosecond) { - return false; - } - - list($lastTick, $balance) = $this->getState(); - - if (!$lastTick) { - $this->saveState(hrtime(true), 0); - return true; - } - - $currentTick = hrtime(true); - $elapsedTime = $currentTick - $lastTick; - $balance += $elapsedTime * $this->creditsPerNanosecond; - if ($balance > $this->maxBalance) { - $balance = $this->maxBalance; - } - - $result = false; - if ($balance >= $itemCost) { - $balance -= $itemCost; - $result = true; - } - - $this->saveState($currentTick, $balance); - - return $result; - } - - - /** - * Initializes limiter costs and boundaries - * - * @param float $creditsPerNanosecond - * @param float $maxBalance - */ - public function initialize(float $creditsPerNanosecond, float $maxBalance) - { - $this->creditsPerNanosecond = $creditsPerNanosecond; - $this->maxBalance = $maxBalance; - } - - /** - * Method loads last tick and current balance from cache - * - * @return array [$lastTick, $balance] - */ - private function getState() : array - { - return [ - $this->lastTick->get(), - $this->balance->get() - ]; - } - - /** - * Method saves last tick and current balance into cache - * - * @param integer $lastTick - * @param float $balance - */ - private function saveState($lastTick, $balance) - { - $this->lastTick->set($lastTick); - $this->balance->set($balance); - $this->cache->saveDeferred($this->lastTick); - $this->cache->saveDeferred($this->balance); - $this->cache->commit(); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Codec/TextCodecTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Codec/TextCodecTest.php deleted file mode 100644 index 79a1dd96f..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Codec/TextCodecTest.php +++ /dev/null @@ -1,170 +0,0 @@ -<?php - -namespace Jaeger\Tests\Codec; - -use Exception; -use const Jaeger\BAGGAGE_HEADER_PREFIX; -use Jaeger\Codec\TextCodec; -use const Jaeger\DEBUG_ID_HEADER_KEY; -use Jaeger\SpanContext; -use const Jaeger\TRACE_ID_HEADER; -use PHPUnit\Framework\TestCase; - -class TextCodecTest extends TestCase -{ - /** @var TextCodec */ - private $textCodec; - - public function setUp(): void - { - $this->textCodec = new TextCodec(); - } - - public function testCanInjectSimpleContextInCarrier(): void - { - $context = new SpanContext('trace-id', 'span-id', null, null); - $carrier = []; - - $this->textCodec->inject($context, $carrier); - - $this->assertCount(1 , $carrier); - $this->assertArrayHasKey(TRACE_ID_HEADER, $carrier); - } - - /** - * @dataProvider contextDataProvider - * @param bool $urlEncode - * @param $baggage - */ - public function testCanInjectContextBaggageInCarrier(bool $urlEncode, $baggage, $injectedBaggage): void - { - $carrier = []; - - $context = new SpanContext('trace-id', 'span-id', null, null, $baggage); - $textCodec = new TextCodec($urlEncode); - $textCodec->inject($context, $carrier); - - $this->assertCount(1 + count($baggage) , $carrier); - $this->assertArrayHasKey(TRACE_ID_HEADER, $carrier); - foreach ($injectedBaggage as $key => $value) { - $this->assertArrayHasKey(BAGGAGE_HEADER_PREFIX . $key, $carrier); - $this->assertEquals($carrier[BAGGAGE_HEADER_PREFIX . $key], $value); - } - } - - public function contextDataProvider() - { - return [ - [false, ['baggage-1' => 'baggage value'], ['baggage-1' => 'baggage value']], - [false, ['baggage-1' => 'https://testdomain.sk'], ['baggage-1' => 'https://testdomain.sk']], - [true, ['baggage-1' => 'https://testdomain.sk'], ['baggage-1' => 'https%3A%2F%2Ftestdomain.sk']], - ]; - } - - /** - * @dataProvider carrierDataProvider - * @param $urlEncode - * @param $carrier - * @param $traceId - * @param $spanId - * @param $parentId - * @param $flags - * @param $baggage - * @throws \Exception - */ - public function testSpanContextParsingFromHeader($urlEncode, $carrier, $traceId, $spanId, $parentId, $flags, $baggage): void - { - $textCodec = new TextCodec($urlEncode); - $spanContext = $textCodec->extract($carrier); - - $this->assertEquals($traceId, $spanContext->getTraceId()); - $this->assertEquals($spanId, $spanContext->getSpanId()); - $this->assertEquals($parentId, $spanContext->getParentId()); - $this->assertEquals($flags, $spanContext->getFlags()); - $this->assertCount(count($baggage), $spanContext->getBaggage() ? $spanContext->getBaggage() : []); - foreach ($baggage as $key => $value) { - $this->assertEquals($value, $spanContext->getBaggageItem($key)); - } - } - - public function carrierDataProvider(): array - { - return [ - [ - false, - [ - TRACE_ID_HEADER => '32834e4115071776:f7802330248418d:f123456789012345:1' - ], - "3639838965278119798", - "1114643325879075213", - "-1070935975401544891", - 1, - [] - ], - [ - false, - [ - TRACE_ID_HEADER => '32834e4115071776:f7802330248418d:f123456789012345:1', - BAGGAGE_HEADER_PREFIX . 'baggage-1' => 'https://testdomain.sk', - ], - "3639838965278119798", - "1114643325879075213", - "-1070935975401544891", - 1, - ['baggage-1' => 'https://testdomain.sk'] - ], - [ - true, - [ - TRACE_ID_HEADER => '32834e4115071776:f7802330248418d:f123456789012345:1', - BAGGAGE_HEADER_PREFIX . 'baggage-1' => 'https%3A%2F%2Ftestdomain.sk', - ], - "3639838965278119798", - "1114643325879075213", - "-1070935975401544891", - 1, - ['baggage-1' => 'https://testdomain.sk'] - ] - ]; - } - - public function testBaggageWithoutTraceContext(): void - { - $carrier = [BAGGAGE_HEADER_PREFIX.'test' => 'some data']; - - $this->expectException(Exception::class); - $this->expectExceptionMessage('baggage without trace ctx'); - - $this->textCodec->extract($carrier); - } - - public function testInvalidSpanContextParsingFromHeader(): void - { - $carrier = [TRACE_ID_HEADER => 'invalid_data']; - - $this->expectException(Exception::class); - $this->expectExceptionMessage('Malformed tracer state string.'); - - $this->textCodec->extract($carrier); - } - - public function testExtractDebugSpanContext(): void - { - $carrier = [DEBUG_ID_HEADER_KEY => 'debugId']; - - $spanContext = $this->textCodec->extract($carrier); - - $this->assertEquals('debugId', $spanContext->getDebugId()); - $this->assertNull($spanContext->getTraceId()); - $this->assertNull($spanContext->getSpanId()); - $this->assertNull($spanContext->getParentId()); - $this->assertNull($spanContext->getFlags()); - } - - - public function testExtractEmptySpanContext(): void - { - $spanContext = $this->textCodec->extract([]); - $this->assertNull($spanContext); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Codec/ZipkinCodecTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Codec/ZipkinCodecTest.php deleted file mode 100644 index 047caac2e..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Codec/ZipkinCodecTest.php +++ /dev/null @@ -1,104 +0,0 @@ -<?php - -namespace Jaeger\Tests\Codec; - -use Jaeger\Codec\ZipkinCodec; -use Jaeger\SpanContext; -use PHPUnit\Framework\TestCase; -use const Jaeger\DEBUG_FLAG; -use const Jaeger\SAMPLED_FLAG; - -class ZipkinCodecTest extends TestCase -{ - /** @var ZipkinCodec */ - private $codec; - - function setUp(): void - { - $this->codec = new ZipkinCodec; - } - - function testInject() - { - // Given - $traceId = 123; - $spanId = 456; - $parentId = 789; - - $spanContext = new SpanContext( - $traceId, - $spanId, - $parentId, - SAMPLED_FLAG - ); - $carrier = []; - - // When - $this->codec->inject($spanContext, $carrier); - - // Then - $this->assertEquals('7b', $carrier['X-B3-TraceId']); - $this->assertEquals('1c8', $carrier['X-B3-SpanId']); - $this->assertEquals('315', $carrier['X-B3-ParentSpanId']); - $this->assertSame(1, $carrier['X-B3-Flags']); - } - - function testExtract() - { - // Given - $carrier = [ - 'x-b3-traceid' => 'a53bf337d7e455e1', - 'x-b3-spanid' => '153bf227d1f455a1', - 'x-b3-parentspanid' => 'a53bf337d7e455e1', - 'x-b3-flags' => '1', - ]; - - // When - $spanContext = $this->codec->extract($carrier); - - // Then - $this->assertEquals(new SpanContext( - '-6540366612654696991', - '1530082751262512545', - '-6540366612654696991', - DEBUG_FLAG - ), $spanContext); - } - - function testExtractWithoutParentSpanId() - { - // Given - $carrier = [ - 'x-b3-traceid' => '8d824d69da5f50d9', - 'x-b3-spanid' => '8d824d69da5f50d9', - 'x-b3-flags' => '1', - ]; - - // When - $spanContext = $this->codec->extract($carrier); - - // Then - $this->assertEquals(new SpanContext( - '-8249946450358742823', - '-8249946450358742823', - '0', - DEBUG_FLAG - ), $spanContext); - } - - function testExtractInvalidHeader() - { - // Given - $carrier = [ - 'x-b3-traceid' => 'zzzz', - 'x-b3-spanid' => '463ac35c9f6413ad48485a3953bb6124', - 'x-b3-flags' => '1', - ]; - - // When - $spanContext = $this->codec->extract($carrier); - - // Then - $this->assertEquals(null, $spanContext); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ConfigTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ConfigTest.php deleted file mode 100644 index da1a9781e..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ConfigTest.php +++ /dev/null @@ -1,257 +0,0 @@ -<?php - -namespace Jaeger\Tests; - -use Exception; -use Jaeger\Config; -use Jaeger\Reporter\ReporterInterface; -use Jaeger\Sampler\SamplerInterface; -use Jaeger\Tracer; -use OpenTracing\GlobalTracer; -use PHPUnit\Framework\TestCase; -use const Jaeger\SAMPLER_TYPE_CONST; - -class ConfigTest extends TestCase -{ - /** - * @var Config - */ - private $config; - - /** - * @var ReporterInterface - */ - private $reporter; - - /** - * @var SamplerInterface - */ - private $sampler; - - /** - * @var string - */ - private $serviceName = 'test-service'; - - function setUp(): void - { - $this->config = new Config([], $this->serviceName); - $this->reporter = $this->createMock(ReporterInterface::class); - $this->sampler = $this->createmock(SamplerInterface::class); - } - - function testCreateTracer() - { - $tracer = $this->config->createTracer($this->reporter, $this->sampler); - - $this->assertEquals(Tracer::class, get_class($tracer)); - $this->assertEquals($this->serviceName, $tracer->getServiceName()); - } - - function testThrowExceptionWhenServiceNameIsNotDefined() - { - $this->expectException(Exception::class); - $this->expectExceptionMessage('service_name required in the config or param.'); - - new Config([]); - } - - function testSetServiceNameFromConfig() - { - $config = new Config(['service_name' => 'test-service-name-from-config']); - - $serviceName = $config->getServiceName(); - - $this->assertEquals('test-service-name-from-config', $serviceName); - } - - /** - * @test - */ - public function shouldSetGlobalTracerAfterInitialize() - { - //given - $config = new Config(['service_name' => 'test-service-name']); - - //when - $config->initializeTracer(); - - //then - $tracer = GlobalTracer::get(); - $this->assertInstanceOf(Tracer::class, $tracer); - } - - /** @test */ - public function shouldThrowExceptionWhenCreatingNotSupportedSampler() - { - $config = new Config(['service_name' => 'test-service-name', 'sampler' => ['type' => 'unsupportedSampler']]); - - $this->expectException(Exception::class); - $this->expectExceptionMessage('Unknown sampler type unsupportedSampler'); - - $config->initializeTracer(); - } - - /** @test */ - public function shouldThrowExceptionWhenCreatingRateLimitingSamplerWithoutCacheComponent() - { - $config = new Config([ - 'service_name' => 'test-service-name', - 'sampler' => ['type' => \Jaeger\SAMPLER_TYPE_RATE_LIMITING] - ]); - - $this->expectException(Exception::class); - $this->expectExceptionMessage('You cannot use RateLimitingSampler without cache component'); - - $config->initializeTracer(); - } - - /** @test */ - public function shouldPassDifferentDispatchMode() { - foreach (Config::getAvailableDispatchModes() as $dispatchMode) { - $config = new Config( - [ - 'sampler' => [ - 'type' => SAMPLER_TYPE_CONST, - 'param' => true, - ], - 'logging' => false, - "local_agent" => [ - "reporting_host" => "localhost", - ], - 'dispatch_mode' => $dispatchMode, - ], - 'your-app-name' - ); - $config->initializeTracer(); - $this->expectNotToPerformAssertions(); - } - } - - /** @test */ - public function shouldPassConfiguredTagsToTracer() - { - $tags = [ - 'bar' => 'a-value', - 'other.tag' => 'foo', - ]; - - $config = new Config([ - 'sampler' => [ - 'type' => SAMPLER_TYPE_CONST, - 'param' => true, - ], - 'service_name' => 'test-service-name', - 'tags' => $tags, - ]); - - $tracer = $config->initializeTracer(); - $span = $tracer->startSpan('test-span'); - $spanTags = $span->getTags(); - - foreach ($tags as $name => $value) { - $this->assertArrayHasKey($name, $spanTags, "Tag '$name' should be set on span"); - $this->assertEquals($value, $spanTags[$name]->value, "Tag '$name' should have configured value"); - } - } - - /** - * @test - * @dataProvider shouldSetConfigPropertiesFromEnvVarsProvider - */ - public function shouldSetConfigPropertiesFromEnvVars($varName, $varVal, $initialConfig, $valueGetter, $expectedVal) - { - $_ENV[$varName] = $varVal; - - $config = new Config([]); - $configProperty = (new \ReflectionObject($config))->getProperty('config'); - $configProperty->setAccessible('true'); - $configArray = $configProperty->getValue($config); - - $this->assertSame($expectedVal, $valueGetter($configArray)); - } - - /** - * @test - * @dataProvider shouldSetConfigPropertiesFromEnvVarsProvider - */ - public function shouldNotSetConfigPropertiesFromEnvVars($varName, $varVal, $initialConfig, $valueGetter, $expectedVal) - { - $_ENV[$varName] = $varVal; - - $config = new Config($initialConfig); - $configProperty = (new \ReflectionObject($config))->getProperty('config'); - $configProperty->setAccessible('true'); - $configArray = $configProperty->getValue($config); - - $this->assertNotEquals($expectedVal, $valueGetter($configArray)); - } - - /** - * 0 -> varName - * 1 -> varVal - * 2 -> initialConfig - * 3 -> valueGetter - * 4 -> expectedVal - */ - public function shouldSetConfigPropertiesFromEnvVarsProvider() { - return [ - [ - 'JAEGER_SERVICE_NAME', - 'some-str', - ['service_name' => 'some-other-str'], - function ($a) { return $a['service_name']; }, - 'some-str', - ], - [ - 'JAEGER_TAGS', - 'some-str', - ['tags' => 'some-other-str'], - function ($a) { return $a['tags']; }, - 'some-str', - ], - [ - 'JAEGER_AGENT_HOST', - 'some-str', - ['local_agent' => ['reporting_host' => 'some-other-str']], - function ($a) { return $a['local_agent']['reporting_host'];}, - 'some-str', - ], - [ - 'JAEGER_AGENT_PORT', - '2222', - ['local_agent' => ['reporting_port' => 1111]], - function ($a) { return $a['local_agent']['reporting_port']; }, - 2222, - ], - [ - 'JAEGER_REPORTER_LOG_SPANS', - 'true', - ['logging' => false], - function ($a) { return $a['logging']; }, - true, - ], - [ - 'JAEGER_REPORTER_MAX_QUEUE_SIZE', - '2222', - ['max_buffer_length' => 1111], - function ($a) { return $a['max_buffer_length']; }, - 2222, - ], - [ - 'JAEGER_SAMPLER_TYPE', - 'some-str', - ['sampler' => ['type' => 'some-other-str']], - function ($a) { return $a['sampler']['type']; }, - 'some-str', - ], - [ - 'JAEGER_SAMPLER_PARAM', - 'some-str', - ['sampler' => ['param' => 'some-other-str']], - function ($a) { return $a['sampler']['param']; }, - 'some-str', - ], - ]; - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Logger/StackLogger.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Logger/StackLogger.php deleted file mode 100644 index fd8789dc3..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Logger/StackLogger.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -namespace Jaeger\Tests\Logger; - -use Psr\Log\LoggerTrait; - -class StackLogger implements \Psr\Log\LoggerInterface -{ - /** @var array */ - protected $messagesStack = []; - - use LoggerTrait; - - public function log($level, $message, array $context = array()): void - { - $this->messagesStack[] = $message; - } - - public function getLastMessage() { - return array_pop($this->messagesStack); - } - - public function getMessagesCount() { - return count($this->messagesStack); - } - - public function clear() { - $this->messagesStack = []; - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Mapper/SpanToJaegerMapperTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Mapper/SpanToJaegerMapperTest.php deleted file mode 100644 index d536cb63a..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Mapper/SpanToJaegerMapperTest.php +++ /dev/null @@ -1,169 +0,0 @@ -<?php - -use Jaeger\Mapper\SpanToJaegerMapper; -use Jaeger\Reporter\NullReporter; -use Jaeger\Sampler\ConstSampler; -use Jaeger\Span; -use Jaeger\SpanContext; -use Jaeger\Thrift\TagType; -use Jaeger\Tracer; -use const Jaeger\SAMPLED_FLAG; -use const OpenTracing\Tags\COMPONENT; -use const OpenTracing\Tags\PEER_HOST_IPV4; -use const OpenTracing\Tags\PEER_PORT; -use const OpenTracing\Tags\PEER_SERVICE; -use const OpenTracing\Tags\SPAN_KIND; -use const OpenTracing\Tags\SPAN_KIND_RPC_CLIENT; - -class SpanToJaegerMapperTest extends \PHPUnit\Framework\TestCase -{ - private $serviceName = "test-service"; - /** - * @var Tracer - */ - private $tracer; - - /** - * @var SpanContext - */ - private $context; - - /** - * {@inheritdoc} - */ - public function setUp(): void - { - $this->tracer = new Tracer($this->serviceName, new NullReporter, new ConstSampler); - $this->context = new SpanContext(0, 0, 0, SAMPLED_FLAG); - } - - /** - * {@inheritdoc} - */ - protected function tearDown(): void - { - $this->tracer = null; - $this->context = null; - } - - /** @test */ - public function shouldProperlyInitializeAtConstructTime(): void - { - $span = new Span($this->context, $this->tracer, 'test-operation'); - $span->setTags([ - "tag-bool1" => true, - "tag-bool2" => false, - "tag-int" => 1234567, - "tag-float" => 1.23456, - "tag-string" => "hello-world" - ]); - - $mapper = new SpanToJaegerMapper(); - $thriftSpan = $mapper->mapSpanToJaeger($span); - - $index = 0; - $this->assertEquals($thriftSpan->tags[$index]->key, "component"); - $this->assertEquals($thriftSpan->tags[$index]->vType, TagType::STRING); - $this->assertEquals($thriftSpan->tags[$index]->vStr, $this->serviceName); - $index++; - - $this->assertEquals($thriftSpan->tags[$index]->key, "tag-bool1"); - $this->assertEquals($thriftSpan->tags[$index]->vType, TagType::BOOL); - $this->assertEquals($thriftSpan->tags[$index]->vBool, true); - $index++; - - $this->assertEquals($thriftSpan->tags[$index]->key, "tag-bool2"); - $this->assertEquals($thriftSpan->tags[$index]->vType, TagType::BOOL); - $this->assertEquals($thriftSpan->tags[$index]->vBool, false); - $index++; - - $this->assertEquals($thriftSpan->tags[$index]->key, "tag-int"); - $this->assertEquals($thriftSpan->tags[$index]->vType, TagType::LONG); - $this->assertEquals($thriftSpan->tags[$index]->vLong, 1234567); - $index++; - - $this->assertEquals($thriftSpan->tags[$index]->key, "tag-float"); - $this->assertEquals($thriftSpan->tags[$index]->vType, TagType::DOUBLE); - $this->assertEquals($thriftSpan->tags[$index]->vDouble, 1.23456); - $index++; - - $this->assertEquals($thriftSpan->tags[$index]->key, "tag-string"); - $this->assertEquals($thriftSpan->tags[$index]->vType, TagType::STRING); - $this->assertEquals($thriftSpan->tags[$index]->vStr, "hello-world"); - $index++; - } - - /** - * @dataProvider specialTagProvider - * @param array<string, mixed> $tags - * @return void - */ - public function testSpecialTagsAreAdded(array $tags): void - { - $span = new Span($this->context, $this->tracer, 'test-operation'); - $span->setTags($tags); - - // The component tag is always added, even if it's not specified in tags - $expectedTagValues = array_merge([COMPONENT => $this->serviceName], $tags); - - $mapper = new SpanToJaegerMapper(); - $thriftSpan = $mapper->mapSpanToJaeger($span); - - $foundTags = []; - - foreach ($thriftSpan->tags as $tag) { - $foundTags[] = $tag->key; - - switch ($tag->key) { - case PEER_SERVICE: - case PEER_HOST_IPV4: - case SPAN_KIND: - case COMPONENT: - $this->assertEquals(TagType::STRING, $tag->vType, 'Incorrect tag value type'); - $this->assertEquals($expectedTagValues[$tag->key], $tag->vStr, 'Incorrect tag value'); - break; - case PEER_PORT: - $this->assertEquals(TagType::LONG, $tag->vType, 'Incorrect tag value type'); - $this->assertEquals($expectedTagValues[$tag->key], $tag->vLong, 'Incorrect tag value'); - break; - } - } - - $this->assertEqualsCanonicalizing(array_keys($expectedTagValues), $foundTags, 'Some of the tags are missing'); - } - - public function specialTagProvider(): array - { - return [ - [ - [ - 'bool_tag' => true, - PEER_SERVICE => 'my_service', - PEER_HOST_IPV4 => '127.0.0.1', - PEER_PORT => 443, - SPAN_KIND => SPAN_KIND_RPC_CLIENT, - COMPONENT => 'grpc', - ], - ], - [ - [ - 'int_tag' => 5, - PEER_HOST_IPV4 => '192.168.0.1', - PEER_PORT => 80, - ], - ], - [ - [ - 'string_tag' => 'testing-tag', - PEER_PORT => 80, - COMPONENT => 'grpc', - ], - ], - [ - [ - 'string_tag' => 'testing-tag', - ], - ], - ]; - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/CompositeReporterTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/CompositeReporterTest.php deleted file mode 100644 index ef95ebfe7..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/CompositeReporterTest.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php - -namespace Jaeger\Tests\Reporter; - -use Jaeger\Reporter\CompositeReporter; -use Jaeger\Reporter\ReporterInterface; -use Jaeger\Span; -use PHPUnit\Framework\TestCase; - -class CompositeReporterTest extends TestCase -{ - /** @var CompositeReporter */ - private $reporter; - - /** @var ReporterInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $childReporter1; - - /** @var ReporterInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $childReporter2; - - /** - * {@inheritdoc} - */ - public function setUp(): void - { - $this->childReporter1 = $this->createMock(ReporterInterface::class); - $this->childReporter2 = $this->createMock(ReporterInterface::class); - - $this->reporter = new CompositeReporter($this->childReporter1, $this->childReporter2); - } - - /** @test */ - public function shouldReportSpan() - { - /** @var \Jaeger\Span|\PHPUnit\Framework\MockObject\MockObject $span */ - $span = $this->createMock(Span::class); - - $this->childReporter1->expects($this->once())->method('reportSpan')->with($span); - $this->childReporter2->expects($this->once())->method('reportSpan')->with($span); - - $this->reporter->reportSpan($span); - } - - /** @test */ - public function shouldCloseReporter() - { - $this->childReporter1->expects($this->once())->method('close'); - $this->childReporter2->expects($this->once())->method('close'); - - $this->reporter->close(); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/InMemoryReporterTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/InMemoryReporterTest.php deleted file mode 100644 index 966a62fa4..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/InMemoryReporterTest.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -namespace Jaeger\Tests\Reporter; - -use Jaeger\Reporter\InMemoryReporter; -use Jaeger\Span; -use PHPUnit\Framework\TestCase; - -class InMemoryReporterTest extends TestCase -{ - /** @test */ - public function shouldReportSpan() - { - /** @var \Jaeger\Span|\PHPUnit\Framework\MockObject\MockObject $span */ - $span = $this->createMock(Span::class); - $reporter = new InMemoryReporter(); - - $reporter->reportSpan($span); - $reporter->close(); - - $spans = $reporter->getSpans(); - $this->assertEquals([$span], $spans); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/LoggingReporterTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/LoggingReporterTest.php deleted file mode 100644 index dc7c490d2..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/LoggingReporterTest.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -namespace Jaeger\Tests\Reporter; - -use Jaeger\Reporter\LoggingReporter; -use Jaeger\Span; -use PHPUnit\Framework\TestCase; -use Psr\Log\NullLogger; - -class LoggingReporterTest extends TestCase -{ - /** @test */ - public function shouldReportSpan() - { - /** - * @var NullLogger|\PHPUnit\Framework\MockObject\MockObject v - * @var Span|\PHPUnit\Framework\MockObject\MockObject $span - */ - $logger = $this->createMock(NullLogger::class); - $span = $this->createMock(Span::class); - - $reporter = new LoggingReporter($logger); - - $logger->expects($this->once()) - ->method('debug') - ->with($this->stringStartsWith('Reporting span')); - - $reporter->reportSpan($span); - $reporter->close(); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/NullReporterTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/NullReporterTest.php deleted file mode 100644 index e6a66cb8a..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/NullReporterTest.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php - -namespace Jaeger\Tests\Reporter; - -use Jaeger\Reporter\NullReporter; -use Jaeger\Span; -use PHPUnit\Framework\TestCase; - -class NullReporterTest extends TestCase -{ - /** - * Nothing to test because NullReporter doing nothing. - * - * @test - */ - public function shouldReportSpan() - { - /** @var \Jaeger\Span|\PHPUnit\Framework\MockObject\MockObject $span */ - $span = $this->createMock(Span::class); - - $reporter = new NullReporter(); - - $reporter->reportSpan($span); - $reporter->close(); - - // Only needed to avoid PhpUnit message: "This test did not perform any assertions" - $this->assertTrue(true); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/RemoteReporterTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/RemoteReporterTest.php deleted file mode 100644 index 0b85f06d0..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Reporter/RemoteReporterTest.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -namespace Jaeger\Tests\Reporter; - -use Jaeger\Reporter\RemoteReporter; -use Jaeger\Sender\UdpSender; -use Jaeger\Span; -use PHPUnit\Framework\TestCase; - -class RemoteReporterTest extends TestCase -{ - /** @var RemoteReporter */ - private $reporter; - - /** @var UdpSender|\PHPUnit\Framework\MockObject\MockObject */ - private $transport; - - /** - * {@inheritdoc} - */ - public function setUp(): void - { - $this->transport = $this->createMock(UdpSender::class); - $this->reporter = new RemoteReporter($this->transport); - } - - /** @test */ - public function shouldReportSpan() - { - /** @var Span|\PHPUnit\Framework\MockObject\MockObject $span */ - $span = $this->createMock(Span::class); - - $this->transport->expects($this->once())->method('append')->with($span); - - $this->reporter->reportSpan($span); - } - - /** @test */ - public function shouldCloseReporter() - { - $this->transport->expects($this->once())->method('flush'); - $this->transport->expects($this->once())->method('close'); - - $this->reporter->close(); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sampler/ConstSamplerTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sampler/ConstSamplerTest.php deleted file mode 100644 index 85cb80504..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sampler/ConstSamplerTest.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php - -namespace Jaeger\Tests\Sampler; - -use Jaeger\Sampler\ConstSampler; -use PHPUnit\Framework\TestCase; -use const Jaeger\SAMPLER_PARAM_TAG_KEY; -use const Jaeger\SAMPLER_TYPE_CONST; -use const Jaeger\SAMPLER_TYPE_TAG_KEY; - -class ConstSamplerTest extends TestCase -{ - /** - * @test - * @dataProvider samplerProvider - * @param bool $decision - * @param mixed $traceId - */ - public function shouldDetermineWhetherOrTraceShouldBeSampled($decision, $traceId) - { - $sampler = new ConstSampler($decision); - - list($sampled, $tags) = $sampler->isSampled($traceId); - - $this->assertEquals($decision, $sampled); - $this->assertEquals([ - SAMPLER_TYPE_TAG_KEY => SAMPLER_TYPE_CONST, - SAMPLER_PARAM_TAG_KEY => $decision, - ], $tags); - - $sampler->close(); - } - - public function samplerProvider() - { - return [ - [true, 1], - [true, PHP_INT_MAX], - [false, 1], - [false, PHP_INT_MAX], - ]; - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sampler/ProbablisticSamplerTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sampler/ProbablisticSamplerTest.php deleted file mode 100644 index 2840ebf8c..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sampler/ProbablisticSamplerTest.php +++ /dev/null @@ -1,68 +0,0 @@ -<?php - -namespace Jaeger\Tests\Sampler; - -use Jaeger\Sampler\ProbabilisticSampler; -use OutOfBoundsException; -use PHPUnit\Framework\TestCase; -use const Jaeger\SAMPLER_PARAM_TAG_KEY; -use const Jaeger\SAMPLER_TYPE_PROBABILISTIC; -use const Jaeger\SAMPLER_TYPE_TAG_KEY; - -class ProbablisticSamplerTest extends TestCase -{ - /** - * @test - * @dataProvider samplerProvider - * @param float $rate - * @param mixed $traceId - * @param bool $decision - */ - public function shouldDetermineWhetherOrTraceShouldBeSampled($rate, $traceId, $decision) - { - $sampler = new ProbabilisticSampler($rate); - - list($sampled, $tags) = $sampler->isSampled($traceId); - - $this->assertEquals($decision, $sampled); - $this->assertEquals([ - SAMPLER_TYPE_TAG_KEY => SAMPLER_TYPE_PROBABILISTIC, - SAMPLER_PARAM_TAG_KEY => $rate, - ], $tags); - - $sampler->close(); - } - - public function samplerProvider() - { - return [ - [1.0, PHP_INT_MAX-1, true], - [0, 0, false], - [0.5, PHP_INT_MIN + 10, true], - [0.5, PHP_INT_MAX - 10, false], - ]; - } - - /** - * @test - * @dataProvider rateProvider - * @param mixed $rate - */ - public function shouldThrowOutOfBoundsExceptionInCaseOfInvalidRate($rate) - { - $this->expectException(OutOfBoundsException::class); - $this->expectExceptionMessage('Sampling rate must be between 0.0 and 1.0.'); - - new ProbabilisticSampler($rate); - } - - public function rateProvider() - { - return [ - [1.1], - [-0.1], - [PHP_INT_MAX], - [PHP_INT_MIN], - ]; - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sampler/RateLimitSamplerTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sampler/RateLimitSamplerTest.php deleted file mode 100644 index 4f6b8a632..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sampler/RateLimitSamplerTest.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php - -namespace Jaeger\Tests\Sampler; - -use Cache\Adapter\PHPArray\ArrayCachePool; -use Jaeger\Sampler\RateLimitingSampler; -use Jaeger\Util\RateLimiter; -use PHPUnit\Framework\TestCase; -use const Jaeger\SAMPLER_PARAM_TAG_KEY; -use const Jaeger\SAMPLER_TYPE_RATE_LIMITING; -use const Jaeger\SAMPLER_TYPE_TAG_KEY; - -class RateLimitSamplerTest extends TestCase -{ - /** - * @test - * @dataProvider maxRateProvider - * @param integer $maxTracesPerSecond - * @param bool $decision - * @throws - */ - public function shouldDetermineWhetherOrTraceShouldBeSampled($maxTracesPerSecond, $decision) - { - $sampler = new RateLimitingSampler( - $maxTracesPerSecond, - new RateLimiter(new ArrayCachePool(), 'balance', 'lastTick') - ); - - $sampler->isSampled(); - list($sampled, $tags) = $sampler->isSampled(); - $this->assertEquals($decision, $sampled); - $this->assertEquals([ - SAMPLER_TYPE_TAG_KEY => SAMPLER_TYPE_RATE_LIMITING, - SAMPLER_PARAM_TAG_KEY => $maxTracesPerSecond, - ], $tags); - - $sampler->close(); - } - - public function maxRateProvider() - { - return [ - [1000000, true], - [1, false], - [0, false], - ]; - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ScopeManagerTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ScopeManagerTest.php deleted file mode 100644 index 43a303642..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ScopeManagerTest.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php - -namespace Jaeger\Tests; - -use Jaeger\ScopeManager; -use Jaeger\Span; -use PHPUnit\Framework\TestCase; - -class ScopeManagerTest extends TestCase -{ - /** - * @var ScopeManager - */ - private $scopeManager; - - function setUp(): void - { - $this->scopeManager = new ScopeManager(); - } - - function testActivate() - { - $span = $this->createMock(Span::class); - - $scope = $this->scopeManager->activate($span, true); - - $this->assertEquals($scope->getSpan(), $span); - } - - function testAbleGetActiveScope() - { - $span = $this->createMock(Span::class); - - $this->assertNull($this->scopeManager->getActive()); - $scope = $this->scopeManager->activate($span, false); - - $this->assertEquals($scope, $this->scopeManager->getActive()); - } - - function testScopeClosingDeactivates() - { - $span = $this->createMock(Span::class); - - $scope = $this->scopeManager->activate($span, false); - $scope->close(); - - $this->assertNull($this->scopeManager->getActive()); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ScopeTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ScopeTest.php deleted file mode 100644 index e36a8de3d..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ScopeTest.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - -namespace Jaeger\Tests; - -use Jaeger\Scope; -use Jaeger\ScopeManager; -use Jaeger\Span; -use PHPUnit\Framework\TestCase; - -class ScopeTest extends TestCase -{ - /** - * @var ScopeManager|\PHPUnit\Framework\MockObject\MockObject - */ - private $scopeManager; - - /** - * @var Span|\PHPUnit\Framework\MockObject\MockObject - */ - private $span; - - function setUp(): void - { - $this->scopeManager = $this->createMock(ScopeManager::class); - $this->span = $this->createMock(Span::class); - } - - function testCloseDoNotFinishSpanOnClose() - { - $scope = new Scope($this->scopeManager, $this->span, false); - - $this->scopeManager->method('getActive')->willReturn($scope); - $this->scopeManager->expects($this->once())->method('getActive'); - $this->span->expects($this->never())->method('finish'); - $this->scopeManager->expects($this->once())->method('setActive'); - - $scope->close(); - } - - function testCloseFinishSpanOnClose() - { - $scope = new Scope($this->scopeManager, $this->span, true); - - $this->scopeManager->method('getActive')->willReturn($scope); - $this->scopeManager->expects($this->once())->method('getActive'); - $this->span->expects($this->once())->method('finish'); - $this->scopeManager->expects($this->once())->method('setActive'); - - $scope->close(); - } - - function testGetSpan() - { - $scope = new Scope($this->scopeManager, $this->span, false); - - $this->assertEquals($this->span, $scope->getSpan()); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sender/JaegerThriftSenderTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sender/JaegerThriftSenderTest.php deleted file mode 100644 index 5bd6d0a7b..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sender/JaegerThriftSenderTest.php +++ /dev/null @@ -1,126 +0,0 @@ -<?php - - -namespace Jaeger\Tests\Sender; - -use Jaeger\Sender\JaegerSender; -use Jaeger\Sender\UdpSender; -use Jaeger\Span; -use Jaeger\SpanContext; -use Jaeger\Thrift\Agent\AgentClient; -use Jaeger\Thrift\Batch; -use Jaeger\Tracer; -use PHPUnit\Framework\TestCase; - -class JaegerThriftSenderTest extends TestCase -{ - /** @var Tracer|\PHPUnit\Framework\MockObject\MockObject */ - private $tracer; - - /** @var SpanContext|\PHPUnit\Framework\MockObject\MockObject */ - private $context; - - public function setUp(): void - { - $tracer = $this->createMock(Tracer::class); - $tracer->method('getIpAddress')->willReturn(''); - $tracer->method('getServiceName')->willReturn(''); - - $this->tracer = $tracer; - - $context = $this->createMock(SpanContext::class); - $this->context = $context; - } - - public function testFlush(): void - { - - $span = $this->createMock(Span::class); - $span->method('getOperationName')->willReturn('dummy-operation'); - $span->method('getTracer')->willReturn($this->tracer); - $span->method('getContext')->willReturn($this->context); - - $client = $this->createMock(AgentClient::class); - $sender = new JaegerSender($client); - $sender->setMaxBufferLength(64000); - - $client - ->expects(self::exactly(1)) - ->method('emitBatch'); - - $sender->append($span); - $sender->append($span); - $sender->append($span); - - self::assertEquals(3, $sender->flush()); - } - - public function testEmitBatch() { - $client = $this->createMock(AgentClient::class); - $sender = new JaegerSender($client); - $sender->setMaxBufferLength(64000); - - $span = $this->createMock(Span::class); - $span->method('getOperationName')->willReturn('dummy-operation'); - $span->method('getTracer')->willReturn($this->tracer); - $span->method('getContext')->willReturn($this->context); - - $client - ->expects($this->once()) - ->method('emitBatch') - ->with($this->callback(function ($batch) { - /** @var Batch $batch */ - $this->assertInstanceOf(Batch::class, $batch); - $this->assertCount(1, $batch->spans); - - /** @var \Jaeger\Thrift\Span $span */ - $span = $batch->spans[0]; - $this->assertInstanceOf(\Jaeger\Thrift\Span::class, $span); - $this->assertSame("dummy-operation", $span->operationName); - - return true; - - })); - - $sender->append($span); - $this->assertEquals(1, $sender->flush()); - } - - public function testMaxBufferLength() { - $tracer = $this->createMock(Tracer::class); - $tracer->method('getIpAddress')->willReturn(''); - $tracer->method('getServiceName')->willReturn(''); - - $context = $this->createMock(SpanContext::class); - - $span = $this->createMock(Span::class); - $span->method('getOperationName')->willReturn('dummy-operation'); - $span->method('getTracer')->willReturn($tracer); - $span->method('getContext')->willReturn($context); - - $client = $this->createMock(AgentClient::class); - - $mockBuilder = $this->getMockBuilder(JaegerSender::class); - $mockMethods = ['emitJaegerBatch']; - if (method_exists($mockBuilder, "onlyMethods")) { - $mockBuilder = $mockBuilder->onlyMethods($mockMethods); - } else { - $mockBuilder = $mockBuilder->setMethods($mockMethods); - } - $sender = $mockBuilder->setConstructorArgs([$client])->getMock(); - $sender->setMaxBufferLength(800); - $sender->expects(self::exactly(2)) - ->method('emitJaegerBatch') - ->withConsecutive( - [self::countOf(2)], - [self::countOf(1)] - ); - - // jaeger batch overhead parameter = 512 - $sender->append($span); // 512 + 143 < 800 - chunk 1 - $sender->append($span); // 512 + 143*2 => 798 < 800 - chunk 1 - $sender->append($span); // 512 + 143*3 > 800 - chunk 2 - - self::assertEquals(3, $sender->flush()); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sender/UdpSenderTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sender/UdpSenderTest.php deleted file mode 100644 index 9011d00e3..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/Sender/UdpSenderTest.php +++ /dev/null @@ -1,116 +0,0 @@ -<?php - -namespace Jaeger\Tests\Sender; - -use Jaeger\Sender\UdpSender; -use Jaeger\Span; -use Jaeger\SpanContext; -use Jaeger\Thrift\Agent\AgentClient; -use Jaeger\Thrift\Agent\Zipkin\Annotation as ZipkinAnnotation; -use Jaeger\Thrift\Agent\Zipkin\Span as ZipkinSpan; -use Jaeger\Tracer; -use PHPUnit\Framework\TestCase; - -class UdpSenderTest extends TestCase -{ - /** - * @var UdpSender - */ - private $sender; - - /** - * @var AgentClient - */ - private $client; - - public function setUp(): void - { - $this->client = $this->createMock(AgentClient::class); - $this->sender = new UdpSender($this->client, 64000); - } - - public function testMaxBufferLength(): void - { - $tracer = $this->createMock(Tracer::class); - $tracer->method('getIpAddress')->willReturn(''); - $tracer->method('getServiceName')->willReturn(''); - - $context = $this->createMock(SpanContext::class); - - $span = $this->createMock(Span::class); - $span->method('getOperationName')->willReturn('dummy-operation'); - $span->method('getTracer')->willReturn($tracer); - $span->method('getContext')->willReturn($context); - - $sender = new UdpSender($this->client, 100); - - $this->client - ->expects(self::exactly(2)) - ->method('emitZipkinBatch') - ->withConsecutive( - [self::countOf(2)], - [self::countOf(1)] - ); - - // one span has a length of ~25 - $sender->append($span); // 30 + 25 < 100 - chunk 1 - $sender->append($span); // 30 + 25 * 2 < 100 - chunk 1 - $sender->append($span); // 30 + 25 * 3 > 100 - chunk 2 - - self::assertEquals(3, $sender->flush()); - } - - public function testFlush(): void - { - $this->assertEquals(0, $this->sender->flush()); - - $logTimeStamp = (int) (microtime(true) * 1000000); - - $tracer = $this->createMock(Tracer::class); - $tracer->method('getIpAddress')->willReturn(''); - $tracer->method('getServiceName')->willReturn(''); - $context = $this->createMock(SpanContext::class); - $span = $this->createMock(Span::class); - $span->method('getTracer')->willReturn($tracer); - $span->method('getContext')->willReturn($context); - $span - ->expects($this->atLeastOnce()) - ->method('getLogs') - ->willReturn([ - [ - 'timestamp' => $logTimeStamp, - 'fields' => [ - 'foo' => 'bar', - ], - ], - ]); - - $this->client - ->expects($this->once()) - ->method('emitZipkinBatch') - ->with($this->callback(function ($spans) use ($logTimeStamp) { - $this->assertCount(1, $spans); - - /* @var $annotation ZipkinSpan */ - $span = $spans[0]; - $this->assertInstanceOf(ZipkinSpan::class, $span); - $this->assertCount(1, $span->annotations); - - /* @var $annotation ZipkinAnnotation */ - $annotation = $span->annotations[0]; - $this->assertInstanceOf(ZipkinAnnotation::class, $annotation); - $this->assertSame($logTimeStamp, $annotation->timestamp); - $this->assertSame( - json_encode([ - 'foo' => 'bar', - ]), - $annotation->value - ); - - return true; - })); - - $this->sender->append($span); - $this->assertEquals(1, $this->sender->flush()); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/SpanContextTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/SpanContextTest.php deleted file mode 100644 index 998061088..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/SpanContextTest.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -namespace Jaeger\Tests; - -use Jaeger\SpanContext; -use PHPUnit\Framework\TestCase; - -class SpanContextTest extends TestCase -{ - public function testIsDebugIdContainerOnly() - { - $ctx = new SpanContext(null, null, null, null, null, 'value1'); - $this->assertTrue($ctx->isDebugIdContainerOnly()); - $this->assertEquals($ctx->getDebugId(), 'value1'); - - $ctx = new SpanContext(1, 2, 3, 1); - $this->assertFalse($ctx->isDebugIdContainerOnly()); - } - - /** - * @dataProvider contextDataProvider - */ - public function testBaggageInit($traceId, $spanId, $parentId, $flags, $baggage, $expected) - { - $ctx = new SpanContext($traceId, $spanId, $parentId, $flags, $baggage); - $this->assertEquals($expected, $ctx->getBaggage()); - } - - public function contextDataProvider() - { - return [ - [null, null, null, null, [], []], - [null, null, null, null, null, []], - [null, null, null, null, ['key' => 'val'], ['key' => 'val']], - ]; - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/SpanTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/SpanTest.php deleted file mode 100644 index d23879680..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/SpanTest.php +++ /dev/null @@ -1,293 +0,0 @@ -<?php - -namespace Jaeger\Tests; - -use Jaeger\Reporter\NullReporter; -use Jaeger\Sampler\ConstSampler; -use Jaeger\Span; -use Jaeger\SpanContext; -use Jaeger\Thrift\Agent\Zipkin\AnnotationType; -use Jaeger\Tracer; -use PHPUnit\Framework\TestCase; -use const Jaeger\SAMPLED_FLAG; - -class SpanTest extends TestCase -{ - /** - * @var Tracer - */ - private $tracer; - - /** - * @var SpanContext - */ - private $context; - - /** - * {@inheritdoc} - */ - public function setUp(): void - { - $this->tracer = new Tracer('test-service', new NullReporter, new ConstSampler); - $this->context = new SpanContext(0, 0,0, SAMPLED_FLAG); - } - - /** - * {@inheritdoc} - */ - protected function tearDown(): void - { - $this->tracer = null; - $this->context = null; - } - - /** @test */ - public function shouldProperlyInitializeAtConstructTime(): void - { - $tags = [ - 'foo-1' => 'test-component-1', - 'foo-2' => 'test-component-2', - 'foo-3' => 'test-component-3', - ]; - - $span = new Span($this->context, $this->tracer, 'test-operation', $tags); - - $this->assertEquals( 3, count($span->getTags())); - $this->assertEquals($this->tracer, $span->getTracer()); - $this->assertEquals(false, $span->isDebug()); - $this->assertEquals(null, $span->getEndTime()); - } - - /** @test */ - public function shouldSetComponentThroughTag(): void - { - $span = new Span($this->context, $this->tracer, 'test-operation'); - - $span->setTag('component', 'libredis'); - - $spanReflection = new \ReflectionClass(Span::class); - $component = $spanReflection->getProperty('component'); - $component->setAccessible(true); - - $this->assertEquals( 0, count($span->getTags())); - $this->assertEquals( 'libredis', $component->getValue($span)); - $this->assertEquals( 'libredis', $span->getComponent()); - } - - /** @test */ - public function shouldSetTags(): void - { - $span = new Span($this->context, $this->tracer, 'test-operation'); - - $this->assertEquals( 0, count($span->getTags())); - - $span->setTags([ - 'foo-1' => 'test-component-1', - 'foo-2' => 'test-component-2', - 'foo-3' => 'test-component-3', - ]); - - $this->assertEquals( 3, count($span->getTags())); - } - - /** @test */ - public function shouldSetDifferentTypeOfTags() { - $span = new Span($this->context, $this->tracer, 'test-operation'); - - $this->assertEquals( 0, count($span->getTags())); - - $span->setTags([ - 'tag-bool1' => true, - 'tag-bool2' => false, - 'tag-int' => 1234567, - 'tag-float' => 1.23456, - 'tag-string' => "hello-world" - ]); - - $tags = array_values($span->getTags()); - $this->assertEquals( 5, count($tags)); - - $index = 0; - $this->assertTrue($tags[$index]->annotation_type === AnnotationType::BOOL); - $this->assertTrue($tags[$index]->value === true); - $this->assertTrue($tags[$index]->key === 'tag-bool1'); - $index++; - - $this->assertTrue($tags[$index]->annotation_type === AnnotationType::BOOL); - $this->assertTrue($tags[$index]->value === false); - $this->assertTrue($tags[$index]->key === 'tag-bool2'); - $index++; - - $this->assertTrue($tags[$index]->annotation_type === AnnotationType::I64); - $this->assertTrue($tags[$index]->value === 1234567); - $this->assertTrue($tags[$index]->key === 'tag-int'); - $index++; - - $this->assertTrue($tags[$index]->annotation_type === AnnotationType::DOUBLE); - $this->assertTrue($tags[$index]->value === 1.23456); - $this->assertTrue($tags[$index]->key === 'tag-float'); - $index++; - - $this->assertTrue($tags[$index]->annotation_type === AnnotationType::STRING); - $this->assertTrue($tags[$index]->value === "hello-world"); - $this->assertTrue($tags[$index]->key === 'tag-string'); - } - - /** @test */ - public function shouldOverwriteTheSameTag(): void - { - // Given - $span = new Span($this->context, $this->tracer, 'test-operation'); - - // When - $span->setTag('foo', 'test-component-1'); - $span->setTag('foo', 'test-component-2'); - - // Then - $this->assertEquals( 1, count($span->getTags())); - $this->assertEquals( 'test-component-2', $span->getTags()['foo']->value); - } - /** @test */ - public function shouldAddLogRecordsToTheSpan(): void - { - $span = new Span($this->context, $this->tracer, 'test-operation'); - - $fields01 = [ - 'event' => 'error', - 'message' => 'dummy error message', - ]; - $fields02 = [ - 'foo' => 'bar', - ]; - - $dateTime01 = new \DateTime('+5 seconds'); - $dateTime02 = $dateTime01->getTimestamp(); - $dateTime03 = microtime(true) + 5; - - $span->log($fields01, $dateTime01); - $span->log($fields02, $dateTime01->getTimestamp()*1000000); - $span->log($fields02, $dateTime03); - $span->log($fields02); - - $logs = $span->getLogs(); - - $this->assertCount(4, $logs); - - $this->assertIsInt($logs[0]['timestamp']); - $this->assertEquals((int)($dateTime01->format('U.u')*1000000), $logs[0]['timestamp']); - $this->assertSame($fields01, $logs[0]['fields']); - - $this->assertIsInt($logs[1]['timestamp']); - $this->assertSame($dateTime02*1000000, $logs[1]['timestamp']); - $this->assertSame($fields02, $logs[1]['fields']); - - $this->assertIsInt($logs[2]['timestamp']); - $this->assertSame((int) ($dateTime03 * 1000000), $logs[2]['timestamp']); - $this->assertSame($fields02, $logs[2]['fields']); - - $this->assertIsInt($logs[3]['timestamp']); - $this->assertSame($fields02, $logs[3]['fields']); - } - - /** @test */ - public function timingDefaultTimes(): void - { - $span = new Span($this->context, $this->tracer, 'test-operation'); - $span->finish(); - - $this->assertEquals(0.0, round(($span->getEndTime() - $span->getStartTime()) / 1000000)); - } - - /** @test */ - public function timingSetStartTimeAsDateTime(): void - { - $span = new Span($this->context, $this->tracer, 'test-operation', [], new \DateTime('-2 seconds')); - $span->finish(); - - $this->assertSpanDuration($span); - } - - /** @test */ - public function timingSetEndTimeAsDateTime(): void - { - $span = new Span($this->context, $this->tracer, 'test-operation'); - - $endTime = new \DateTime('+2 seconds'); - // add microseconds because php < 7.1 has a bug - // https://bugs.php.net/bug.php?id=48225 - if (version_compare(phpversion(), '7.1', '<')) { - list($usec) = explode(' ', microtime()); - $endTime = \DateTime::createFromFormat('U.u', $endTime->format('U')+$usec); - } - $span->finish($endTime); - - $this->assertSpanDuration($span); - } - - /** @test */ - public function timingSetStartTimeAsInt(): void - { - $span = new Span($this->context, $this->tracer, 'test-operation', [], (int) round((microtime(true) - 2) * 1000000)); - $span->finish(); - - $this->assertSpanDuration($span); - } - - /** @test */ - public function timingSetEndTimeAsInt(): void - { - $span = new Span($this->context, $this->tracer, 'test-operation'); - $span->finish((int) round((microtime(true) + 2) * 1000000)); - - $this->assertSpanDuration($span); - } - - /** @test */ - public function timingSetStartTimeAsFloat(): void - { - $span = new Span($this->context, $this->tracer, 'test-operation', [], microtime(true) - 2); - $span->finish(); - - $this->assertSpanDuration($span); - } - - /** @test */ - public function timingSetEndTimeAsFloat(): void - { - $span = new Span($this->context, $this->tracer, 'test-operation'); - $span->finish(microtime(true) + 2); - - $this->assertSpanDuration($span); - } - - /** @test */ - public function timingSetMixedTimes(): void - { - $span = new Span($this->context, $this->tracer, 'test-operation', [], new \DateTime()); - $span->finish(microtime(true) + 2); - - $this->assertSpanDuration($span); - } - - protected function assertSpanDuration(Span $span): void - { - $this->assertEquals(2, (int)(($span->getEndTime() - $span->getStartTime()) / 1000000)); - } - - /** @test */ - public function invalidStartTime(): void - { - $this->expectException(\InvalidArgumentException::class); - $this->expectExceptionMessage('Time should be one of the types int|float|DateTime|null, got string.'); - $span = new Span($this->context, $this->tracer, 'test-operation', [], 'string'); - } - - /** @test */ - public function invalidEndTime(): void - { - $span = new Span($this->context, $this->tracer, 'test-operation'); - $this->expectException(\InvalidArgumentException::class); - $this->expectExceptionMessage('Time should be one of the types int|float|DateTime|null, got array.'); - $span->finish([]); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ThriftUdpTransportTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ThriftUdpTransportTest.php deleted file mode 100644 index abc4e32aa..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/ThriftUdpTransportTest.php +++ /dev/null @@ -1,166 +0,0 @@ -<?php - -namespace Jaeger\Tests; - -use Jaeger\Config; -use Jaeger\Tests\Logger\StackLogger; -use Jaeger\ThriftUdpTransport; -use Jaeger\Tracer; -use PHPUnit\Framework\TestCase; -use Thrift\Exception\TTransportException; - -class ThriftUdpTransportTest extends TestCase -{ - /** - * @var ThriftUdpTransport - */ - private $transport; - - /** - * @var StackLogger - */ - private $logger; - - public function setUp(): void - { - $this->logger = new StackLogger(); - $this->transport = new ThriftUdpTransport('127.0.0.1', 12345, $this->logger); - } - - public function testisOpenWhenOpen() - { - $this->assertEquals($this->logger->getMessagesCount(), 0); - $this->assertTrue($this->transport->isOpen()); - $this->assertEquals($this->logger->getMessagesCount(), 0); - } - - public function testisOpenWhenClosed() - { - $this->assertEquals($this->logger->getMessagesCount(), 0); - $this->transport->close(); - $this->assertFalse($this->transport->isOpen()); - $this->assertEquals($this->logger->getMessagesCount(), 0); - } - - public function testClose() - { - $this->assertEquals($this->logger->getMessagesCount(), 0); - $this->transport->close(); - - $this->assertEquals($this->logger->getMessagesCount(), 0); - $this->transport->write('hello'); - $this->assertEquals($this->logger->getMessagesCount(), 1); - $this->assertEquals($this->logger->getLastMessage(), 'transport is closed'); - $this->assertEquals($this->logger->getMessagesCount(), 0); - } - - public function testDoubleClose() - { - $this->assertEquals($this->logger->getMessagesCount(), 0); - $this->transport->close(); - $this->assertEquals($this->logger->getMessagesCount(), 0); - $this->transport->close(); - $this->assertEquals($this->logger->getMessagesCount(), 1); - $this->assertEquals( - $this->logger->getLastMessage(), - "can't close empty socket" - ); - } - - public function testException() - { - $this->assertEquals($this->logger->getMessagesCount(), 0); - $this->transport->open(); - $this->assertEquals($this->logger->getMessagesCount(), 0); - - $this->transport->write(str_repeat("some string", 10000)); - - $this->assertEquals($this->logger->getMessagesCount(), 1); - $msg = $this->logger->getLastMessage(); - $pattern = "/socket_write failed: \[code - \d+\] Message too long/"; - - if (method_exists($this, "assertMatchesRegularExpression")) { - $this->assertMatchesRegularExpression($pattern, $msg); - } else { - $this->assertRegExp($pattern, $msg); - } - } - - public function testProtocolVersionIPv4() - { - $config = new Config([ - Config::IP_VERSION => Config::IPV4 - ], "testServiceName"); - - $transport = new ThriftUdpTransport('127.0.0.1', 12345, $this->logger, $config); - - $reflectionTransport = new \ReflectionClass($transport); - $ipProtocolVersionMethod = $reflectionTransport->getMethod("ipProtocolVersion"); - $ipProtocolVersionMethod->setAccessible(true); - - $this->assertEquals(Config::IPV4, $ipProtocolVersionMethod->invoke($transport)); - } - - public function testProtocolVersionIPv6() - { - $config = new Config([ - Config::IP_VERSION => Config::IPV6 - ], "testServiceName"); - - $transport = new ThriftUdpTransport('127.0.0.1', 12345, $this->logger, $config); -// - $reflectionTransport = new \ReflectionClass($transport); - $ipProtocolVersionMethod = $reflectionTransport->getMethod("ipProtocolVersion"); - $ipProtocolVersionMethod->setAccessible(true); -// - $this->assertEquals(Config::IPV6, $ipProtocolVersionMethod->invoke($transport)); - } - - public function testProtocolVersionDefault() - { - $config = new Config([ - ], "testServiceName"); - - $transport = new ThriftUdpTransport('127.0.0.1', 12345, $this->logger, $config); - - $reflectionTransport = new \ReflectionClass($transport); - $ipProtocolVersionMethod = $reflectionTransport->getMethod("ipProtocolVersion"); - $ipProtocolVersionMethod->setAccessible(true); - - $this->assertEquals(Config::IPV4, $ipProtocolVersionMethod->invoke($transport)); - } - - public function testCreateSocket() - { - $transport = $this->getMockBuilder(ThriftUdpTransport::class) - ->disableOriginalConstructor() - ->getMock(); - - $reflectionClass = new \ReflectionClass($transport); - $method = $reflectionClass->getMethod("setLogger"); - $method->setAccessible(true); - $method->invokeArgs($transport, [$this->logger]); - - $method = $reflectionClass->getMethod("createSocket"); - $method->setAccessible(true); - $res = $method->invokeArgs($transport, [Config::IPV6]); - - $this->assertNotFalse($res); - - - $transport = $this->getMockBuilder(ThriftUdpTransport::class) - ->disableOriginalConstructor() - ->getMock(); - - $reflectionClass = new \ReflectionClass($transport); - $method = $reflectionClass->getMethod("setLogger"); - $method->setAccessible(true); - $method->invokeArgs($transport, [$this->logger]); - - $method = $reflectionClass->getMethod("createSocket"); - $method->setAccessible(true); - $res = $method->invokeArgs($transport, [Config::IPV4]); - - $this->assertNotFalse($res); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/TracerTest.php b/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/TracerTest.php deleted file mode 100644 index 3e7b4c05f..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/Jaeger/TracerTest.php +++ /dev/null @@ -1,262 +0,0 @@ -<?php - -namespace Jaeger\Tests; - -use Jaeger\Reporter\ReporterInterface; -use Jaeger\Sampler\SamplerInterface; -use Jaeger\Scope; -use Jaeger\ScopeManager; -use Jaeger\Span; -use Jaeger\SpanContext; -use Jaeger\Tracer; -use OpenTracing\Exceptions\UnsupportedFormat; -use OpenTracing\NoopSpanContext; -use OpenTracing\UnsupportedFormatException; -use PHPUnit\Framework\TestCase; -use Psr\Log\LoggerInterface; -use Psr\Log\NullLogger; -use const Jaeger\BAGGAGE_HEADER_PREFIX; -use const Jaeger\DEBUG_ID_HEADER_KEY; -use const Jaeger\TRACE_ID_HEADER; -use const Jaeger\ZIPKIN_SPAN_FORMAT; -use const OpenTracing\Formats\TEXT_MAP; - -class TracerTest extends TestCase -{ - /** - * @var ReporterInterface|\PHPUnit\Framework\MockObject\MockObject - */ - private $reporter; - - /** - * @var SamplerInterface|\PHPUnit\Framework\MockObject\MockObject - */ - private $sampler; - - /** - * @var LoggerInterface - */ - private $logger; - - /** - * @var ScopeManager|\PHPUnit\Framework\MockObject\MockObject - */ - private $scopeManager; - - /** - * @var Tracer - */ - private $tracer; - - /** - * @var string - */ - private $serviceName = 'test-service'; - - /** - * @var string - */ - private $operationName = 'test-operation'; - - public function setUp(): void - { - $this->scopeManager = $this->createMock(ScopeManager::class); - $this->sampler = $this->createMock(SamplerInterface::class); - $this->reporter = $this->createMock(ReporterInterface::class); - $this->logger = new NullLogger(); - - $this->tracer = new Tracer($this->serviceName, $this->reporter, $this->sampler, true, $this->logger, $this->scopeManager); - } - - public function testStartSpan(): void - { - $span = $this->tracer->startSpan($this->operationName); - - $this->assertEquals($this->operationName, $span->getOperationName()); - } - - public function testStartActiveSpan(): void - { - $tracer = new Tracer($this->serviceName, $this->reporter, $this->sampler); - - $tracer->startActiveSpan('test-operation1'); - $this->assertEquals('test-operation1', $tracer->getActiveSpan()->getOperationName()); - - $scope = $tracer->startActiveSpan('test-operation2'); - $this->assertEquals('test-operation2', $tracer->getActiveSpan()->getOperationName()); - $scope->close(); - - $this->assertEquals('test-operation1', $tracer->getActiveSpan()->getOperationName()); - } - - /** @test */ - public function shouldAddConfiguredTagsToStartedSpanWhenSampled(): void - { - $this->sampler->expects($this->any()) - ->method('isSampled') - ->willReturn([true, []]); - - $tags = [ - 'bar' => 'a-value', - 'other.tag' => 'foo', - ]; - - $tracer = new Tracer( - $this->serviceName, - $this->reporter, - $this->sampler, - true, - $this->logger, - $this->scopeManager, - TRACE_ID_HEADER, - BAGGAGE_HEADER_PREFIX, - DEBUG_ID_HEADER_KEY, - $tags - ); - - $span = $tracer->startSpan('test-span'); - $spanTags = $span->getTags(); - - foreach ($tags as $name => $value) { - $this->assertArrayHasKey($name, $spanTags, "Tag '$name' should be set on span"); - $this->assertEquals($value, $spanTags[$name]->value, "Tag '$name' should have configured value"); - } - } - - /** @test */ - public function shouldAddNoConfiguredTagsToStartedSpanWhenNotSampled(): void - { - $this->sampler->expects($this->any()) - ->method('isSampled') - ->willReturn([false, []]); - - $tags = [ - 'bar' => 'a-value', - 'other.tag' => 'foo', - ]; - - $tracer = new Tracer( - $this->serviceName, - $this->reporter, - $this->sampler, - true, - $this->logger, - $this->scopeManager, - TRACE_ID_HEADER, - BAGGAGE_HEADER_PREFIX, - DEBUG_ID_HEADER_KEY, - $tags - ); - - $span = $tracer->startSpan('test-span'); - - $this->assertEquals([], $span->getTags(), 'No tags should be set when not sampled'); - } - - /** @test */ - public function shouldThrowExceptionOnInvalidFormat(): void - { - $spanContext = new SpanContext(0, 0, 0, 0); - $carrier = []; - - $this->expectException(UnsupportedFormatException::class); - $this->expectExceptionMessage('The format "bad-format" is not supported.'); - - $this->tracer->inject($spanContext, 'bad-format', $carrier); - $this->assertSame([], $carrier); - } - - /** @test */ - public function shouldNotThrowExceptionOnInvalidContext(): void - { - $spanContext = new NoopSpanContext(); - $carrier = []; - - $this->tracer->inject($spanContext, ZIPKIN_SPAN_FORMAT, $carrier); - $this->assertSame([], $carrier); - } - - /** @test */ - public function shouldInjectSpanContextToCarrier(): void - { - $spanContext = new SpanContext(0, 0, 0, 0); - $carrier = []; - - $this->tracer->inject($spanContext, TEXT_MAP, $carrier); - - $this->assertCount(1, $carrier); - $this->assertEquals('0:0:0:0', $carrier[TRACE_ID_HEADER]); - } - - /** @test */ - public function shouldThrowExceptionOnExtractInvalidFormat(): void - { - $this->expectException(UnsupportedFormatException::class); - $this->expectExceptionMessage('The format "bad-format" is not supported.'); - - $this->tracer->extract('bad-format', []); - } - - /** @test */ - public function shouldNotThrowExceptionOnExtractFromMalformedState(): void - { - $this->assertNull($this->tracer->extract(TEXT_MAP, ['uber-trace-id' => ''])); - } - - /** @test */ - public function shouldExtractSpanContextFromCarrier(): void - { - $carrier = ['uber-trace-id' => '32834e4115071776:f7802330248418d:f123456789012345:1']; - - $this->assertInstanceOf(SpanContext::class, $this->tracer->extract(TEXT_MAP, $carrier)); - } - - public function testGetScopeManager() - { - $this->assertEquals($this->scopeManager, $this->tracer->getScopeManager()); - } - - public function testGetActiveSpan(): void - { - $span = $this->createMock(Span::class); - $scope = $this->createMock(Scope::class); - $scope->expects($this->once())->method('getSpan')->willReturn($span); - - $this->scopeManager->expects($this->once())->method('getActive')->willReturn($scope); - - $this->assertEquals($span, $this->tracer->getActiveSpan()); - } - - public function testGetActiveSpanNull(): void - { - $this->scopeManager->expects($this->once())->method('getActive')->willReturn(null); - - $this->assertEquals(null, $this->tracer->getActiveSpan()); - } - - public function testFlush(): void - { - $this->reporter->expects($this->once())->method('close'); - - $this->tracer->flush(); - } - - /** @test */ - public function shouldHandleEmptyHostName(): void - { - $tracer = new \ReflectionClass(Tracer::class); - - $getHostByName = $tracer->getMethod('getHostByName'); - $getHostByName->setAccessible(true); - - $stub = $this->getMockBuilder(Tracer::class) - ->disableOriginalConstructor() - ->getMockForAbstractClass(); - - $logger = $tracer->getProperty('logger'); - $logger->setAccessible(true); - $logger->setValue($stub, $this->logger); - - $this->assertEquals('127.0.0.1', $getHostByName->invokeArgs($stub, [null])); - } -} diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/README.md b/vendor/jonahgeorge/jaeger-client-php/tests/README.md deleted file mode 100644 index aa828030f..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# Jaeger Bindings for PHP OpenTracing API: Unit Tests - -Welcome to the Jaeger Testing Suite. - -This folder includes all the unit tests that test Jaeger components, ensuring that you enjoy a bug free library. - -## Current PHP Support - -| version | status | -|---------|--------| -| 7.0 | ✔ | -| 7.1 | ✔ | -| 7.2 | ✔ | - - -## Getting Started - -This testing suite uses [Travis CI](https://travis-ci.org/) for each run. -Every commit pushed to this repository will queue a build into the continuous integration service and will run all tests -to ensure that everything is going well and the project is stable. - -The testing suite can be run on your own machine. The main dependency is [PHPUnit](https://phpunit.de/) -which can be installed using [Composer](https://getcomposer.org/): - -```bash -# run this command from project root -$ composer install -``` - -Then run the tests by calling command from the terminal as follows: - -```bash -$ composer test -``` - -## Run Tests for Supported Versions - -There is also an ability to run tests for different PHP versions. To achieve this we offer use -[docker](https://docs.docker.com/install/)-based approach: - -```bash - -$ docker run --rm -it -v $(pwd):/usr/app php:7.0 ./usr/app/tests/php-test.sh - -$ docker run --rm -it -v $(pwd):/usr/app php:7.1 ./usr/app/tests/php-test.sh - -$ docker run --rm -it -v $(pwd):/usr/app php:7.2 ./usr/app/tests/php-test.sh -``` diff --git a/vendor/jonahgeorge/jaeger-client-php/tests/php-test.sh b/vendor/jonahgeorge/jaeger-client-php/tests/php-test.sh deleted file mode 100644 index 99a522856..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/tests/php-test.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env bash - -# trace ERR through pipes -set -o pipefail - -# trace ERR through 'time command' and other functions -set -o errtrace - -# set -u : exit the script if you try to use an uninitialised variable -set -o nounset - -# set -e : exit the script if any statement returns a non-true return value -set -o errexit - -# to avoid message: -# "Do not run Composer as root/super user! See https://getcomposer.org/root for details" -export COMPOSER_ALLOW_SUPERUSER=1 - -export TERM=xterm-256color - -echo "[INFO]: Install OS dependencies..." -apt-get update -yq > /dev/null 2>&1 -apt-get install -yq git wget unzip zip > /dev/null 2>&1 - -echo "[INFO]: Install PHP extensions..." -docker-php-ext-install bcmath sockets > /dev/null 2>&1 -pecl install hrtime > /dev/null 2>&1 -docker-php-ext-enable hrtime > /dev/null 2>&1 - -echo "[INFO]: Install Xdebug to enable code coverage..." -pecl install xdebug > /dev/null 2>&1 -docker-php-ext-enable xdebug > /dev/null 2>&1 - -cd /tmp - -echo "[INFO]: Install Composer..." -EXPECTED_SIGNATURE="$(wget -q -O - https://composer.github.io/installer.sig)" -php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" -ACTUAL_SIGNATURE="$(php -r "echo hash_file('SHA384', 'composer-setup.php');")" - -if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]; then - >&2 echo '[ERROR]: Invalid installer signature' - rm composer-setup.php - exit 1 -fi - -php composer-setup.php --quiet -rm composer-setup.php - -# this step is required to be able to overwrite composer.lock -cp -R /usr/app /usr/tests - -cd /usr/tests -rm -f composer.lock - -echo "[INFO]: Install library dependencies..." -php /tmp/composer.phar install \ - --no-interaction \ - --no-ansi \ - --no-progress \ - --no-suggest - -echo -e "[INFO]: Run tests...\n" -/tmp/composer.phar test |