From ad9b675ca3900164f5629a839adc92ce4c3981d1 Mon Sep 17 00:00:00 2001 From: Brett McBride Date: Thu, 8 Dec 2022 10:16:58 +1100 Subject: [PATCH] removing jaeger exporters Jaeger has dropped support for the jaeger exporter in favour of opentelemetry exporter. The upstream repos are now archived. Support has been dropped from the opentelemetry collector, and other SIGs should follow soon. ref: https://github.com/open-telemetry/opentelemetry-specification/pull/2858 and https://github.com/open-telemetry/opentelemetry-specification/issues/2859 --- .gitsplit.yml | 4 - .phan/config.php | 3 - Makefile | 3 - README.md | 4 +- composer.json | 8 +- deptrac.yaml | 13 - examples/traces/exporters/jaeger.php | 64 --- examples/traces/exporters/jaeger_thrift.php | 72 ---- examples/traces/exporters/zipkin.php | 1 - .../traces/features/parent_span_example.php | 10 - .../troubleshooting/logging_of_span_data.php | 11 +- phpmetrics.json | 3 +- script/thrift_gen.sh | 28 -- src/Contrib/Jaeger/AgentExporter.php | 57 --- .../Jaeger/BatchAdapter/BatchAdapter.php | 23 - .../BatchAdapter/BatchAdapterFactory.php | 13 - .../BatchAdapterFactoryInterface.php | 10 - .../BatchAdapter/BatchAdapterInterface.php | 12 - src/Contrib/Jaeger/Exporter.php | 11 - src/Contrib/Jaeger/HttpCollectorExporter.php | 44 -- src/Contrib/Jaeger/HttpSender.php | 130 ------ src/Contrib/Jaeger/IdConverter.php | 41 -- src/Contrib/Jaeger/JaegerTransport.php | 114 ----- src/Contrib/Jaeger/ParsedEndpointUrl.php | 65 --- src/Contrib/Jaeger/README.md | 11 - src/Contrib/Jaeger/SpanConverter.php | 237 ----------- src/Contrib/Jaeger/TagFactory/TagFactory.php | 86 ---- src/Contrib/Jaeger/ThriftHttpTransport.php | 101 ----- src/Contrib/Jaeger/ThriftUdpTransport.php | 90 ---- src/Contrib/Jaeger/TransportInterface.php | 33 -- src/Contrib/Jaeger/composer.json | 31 -- src/Contrib/composer.json | 6 +- src/SDK/Common/Configuration/Defaults.php | 9 - src/SDK/Common/Configuration/KnownValues.php | 4 - src/SDK/Common/Configuration/ValueTypes.php | 10 - src/SDK/Common/Configuration/Variables.php | 10 - tests/TraceContext/W3CTestService/index.php | 13 +- .../Unit/Contrib/Jaeger/AgentExporterTest.php | 29 -- tests/Unit/Contrib/Jaeger/IdConverterTest.php | 56 --- .../Contrib/Jaeger/JaegerExporterTest.php | 27 -- .../JaegerHttpCollectorExporterTest.php | 41 -- .../Contrib/Jaeger/JaegerHttpSenderTest.php | 185 -------- .../Jaeger/JaegerSpanConverterTest.php | 237 ----------- .../Configuration/ConfigurationTest.php | 6 +- tests/Unit/SDK/Trace/ExporterFactoryTest.php | 3 +- thrift/jaeger/Agent/AgentClient.php | 86 ---- thrift/jaeger/Agent/AgentIf.php | 29 -- thrift/jaeger/Agent/Agent_emitBatch_args.php | 99 ----- .../Agent/Agent_emitZipkinBatch_args.php | 116 ----- .../Agent/AggregationValidatorClient.php | 91 ---- .../jaeger/Agent/AggregationValidatorIf.php | 26 -- ...ggregationValidator_validateTrace_args.php | 94 ---- ...regationValidator_validateTrace_result.php | 99 ----- thrift/jaeger/Agent/BaggageRestriction.php | 118 ------ .../Agent/BaggageRestrictionManagerClient.php | 91 ---- .../Agent/BaggageRestrictionManagerIf.php | 30 -- ...ionManager_getBaggageRestrictions_args.php | 94 ---- ...nManager_getBaggageRestrictions_result.php | 116 ----- thrift/jaeger/Agent/Dependencies.php | 116 ----- thrift/jaeger/Agent/DependencyClient.php | 118 ------ thrift/jaeger/Agent/DependencyIf.php | 30 -- thrift/jaeger/Agent/DependencyLink.php | 142 ------- ...ependency_getDependenciesForTrace_args.php | 94 ---- ...endency_getDependenciesForTrace_result.php | 99 ----- .../Dependency_saveDependencies_args.php | 99 ----- .../Agent/OperationSamplingStrategy.php | 123 ------ .../Agent/PerOperationSamplingStrategies.php | 188 -------- .../Agent/ProbabilisticSamplingStrategy.php | 94 ---- .../Agent/RateLimitingSamplingStrategy.php | 94 ---- thrift/jaeger/Agent/SamplingManagerClient.php | 91 ---- thrift/jaeger/Agent/SamplingManagerIf.php | 26 -- ...mplingManager_getSamplingStrategy_args.php | 94 ---- ...lingManager_getSamplingStrategy_result.php | 99 ----- .../jaeger/Agent/SamplingStrategyResponse.php | 181 -------- thrift/jaeger/Agent/SamplingStrategyType.php | 30 -- .../jaeger/Agent/ServiceThrottlingConfig.php | 123 ------ thrift/jaeger/Agent/ThrottlingConfig.php | 142 ------- thrift/jaeger/Agent/ThrottlingResponse.php | 145 ------- .../jaeger/Agent/ThrottlingServiceClient.php | 91 ---- thrift/jaeger/Agent/ThrottlingServiceIf.php | 26 -- ...tlingService_getThrottlingConfigs_args.php | 114 ----- ...ingService_getThrottlingConfigs_result.php | 99 ----- thrift/jaeger/Agent/ValidateTraceResponse.php | 118 ------ thrift/jaeger/Agent/Zipkin/Annotation.php | 159 ------- thrift/jaeger/Agent/Zipkin/AnnotationType.php | 45 -- .../jaeger/Agent/Zipkin/BinaryAnnotation.php | 193 --------- thrift/jaeger/Agent/Zipkin/Constant.php | 261 ------------ thrift/jaeger/Agent/Zipkin/Endpoint.php | 191 --------- thrift/jaeger/Agent/Zipkin/Response.php | 94 ---- thrift/jaeger/Agent/Zipkin/Span.php | 397 ----------------- .../Agent/Zipkin/ZipkinCollectorClient.php | 91 ---- .../jaeger/Agent/Zipkin/ZipkinCollectorIf.php | 26 -- ...ZipkinCollector_submitZipkinBatch_args.php | 116 ----- ...pkinCollector_submitZipkinBatch_result.php | 116 ----- thrift/jaeger/Batch.php | 198 --------- thrift/jaeger/BatchSubmitResponse.php | 94 ---- thrift/jaeger/ClientStats.php | 142 ------- thrift/jaeger/CollectorClient.php | 91 ---- thrift/jaeger/CollectorIf.php | 26 -- .../jaeger/Collector_submitBatches_args.php | 116 ----- .../jaeger/Collector_submitBatches_result.php | 116 ----- thrift/jaeger/Crossdock/Downstream.php | 219 ---------- thrift/jaeger/Crossdock/JoinTraceRequest.php | 123 ------ thrift/jaeger/Crossdock/ObservedSpan.php | 142 ------- thrift/jaeger/Crossdock/StartTraceRequest.php | 171 -------- thrift/jaeger/Crossdock/TraceResponse.php | 158 ------- .../jaeger/Crossdock/TracedServiceClient.php | 150 ------- thrift/jaeger/Crossdock/TracedServiceIf.php | 39 -- .../TracedService_joinTrace_args.php | 99 ----- .../TracedService_joinTrace_result.php | 99 ----- .../TracedService_startTrace_args.php | 99 ----- .../TracedService_startTrace_result.php | 99 ----- thrift/jaeger/Crossdock/Transport.php | 33 -- thrift/jaeger/Log.php | 140 ------ thrift/jaeger/Process.php | 140 ------ thrift/jaeger/README.md | 1 - thrift/jaeger/Span.php | 400 ------------------ thrift/jaeger/SpanRef.php | 166 -------- thrift/jaeger/SpanRefType.php | 30 -- thrift/jaeger/Tag.php | 238 ----------- thrift/jaeger/TagType.php | 39 -- thrift/jaeger/composer.json | 22 - 122 files changed, 20 insertions(+), 10693 deletions(-) delete mode 100644 examples/traces/exporters/jaeger.php delete mode 100644 examples/traces/exporters/jaeger_thrift.php delete mode 100755 script/thrift_gen.sh delete mode 100644 src/Contrib/Jaeger/AgentExporter.php delete mode 100644 src/Contrib/Jaeger/BatchAdapter/BatchAdapter.php delete mode 100644 src/Contrib/Jaeger/BatchAdapter/BatchAdapterFactory.php delete mode 100644 src/Contrib/Jaeger/BatchAdapter/BatchAdapterFactoryInterface.php delete mode 100644 src/Contrib/Jaeger/BatchAdapter/BatchAdapterInterface.php delete mode 100644 src/Contrib/Jaeger/Exporter.php delete mode 100644 src/Contrib/Jaeger/HttpCollectorExporter.php delete mode 100644 src/Contrib/Jaeger/HttpSender.php delete mode 100644 src/Contrib/Jaeger/IdConverter.php delete mode 100644 src/Contrib/Jaeger/JaegerTransport.php delete mode 100644 src/Contrib/Jaeger/ParsedEndpointUrl.php delete mode 100644 src/Contrib/Jaeger/README.md delete mode 100644 src/Contrib/Jaeger/SpanConverter.php delete mode 100644 src/Contrib/Jaeger/TagFactory/TagFactory.php delete mode 100644 src/Contrib/Jaeger/ThriftHttpTransport.php delete mode 100644 src/Contrib/Jaeger/ThriftUdpTransport.php delete mode 100644 src/Contrib/Jaeger/TransportInterface.php delete mode 100644 src/Contrib/Jaeger/composer.json delete mode 100644 tests/Unit/Contrib/Jaeger/AgentExporterTest.php delete mode 100644 tests/Unit/Contrib/Jaeger/IdConverterTest.php delete mode 100644 tests/Unit/Contrib/Jaeger/JaegerExporterTest.php delete mode 100644 tests/Unit/Contrib/Jaeger/JaegerHttpCollectorExporterTest.php delete mode 100644 tests/Unit/Contrib/Jaeger/JaegerHttpSenderTest.php delete mode 100644 tests/Unit/Contrib/Jaeger/JaegerSpanConverterTest.php delete mode 100644 thrift/jaeger/Agent/AgentClient.php delete mode 100644 thrift/jaeger/Agent/AgentIf.php delete mode 100644 thrift/jaeger/Agent/Agent_emitBatch_args.php delete mode 100644 thrift/jaeger/Agent/Agent_emitZipkinBatch_args.php delete mode 100644 thrift/jaeger/Agent/AggregationValidatorClient.php delete mode 100644 thrift/jaeger/Agent/AggregationValidatorIf.php delete mode 100644 thrift/jaeger/Agent/AggregationValidator_validateTrace_args.php delete mode 100644 thrift/jaeger/Agent/AggregationValidator_validateTrace_result.php delete mode 100644 thrift/jaeger/Agent/BaggageRestriction.php delete mode 100644 thrift/jaeger/Agent/BaggageRestrictionManagerClient.php delete mode 100644 thrift/jaeger/Agent/BaggageRestrictionManagerIf.php delete mode 100644 thrift/jaeger/Agent/BaggageRestrictionManager_getBaggageRestrictions_args.php delete mode 100644 thrift/jaeger/Agent/BaggageRestrictionManager_getBaggageRestrictions_result.php delete mode 100644 thrift/jaeger/Agent/Dependencies.php delete mode 100644 thrift/jaeger/Agent/DependencyClient.php delete mode 100644 thrift/jaeger/Agent/DependencyIf.php delete mode 100644 thrift/jaeger/Agent/DependencyLink.php delete mode 100644 thrift/jaeger/Agent/Dependency_getDependenciesForTrace_args.php delete mode 100644 thrift/jaeger/Agent/Dependency_getDependenciesForTrace_result.php delete mode 100644 thrift/jaeger/Agent/Dependency_saveDependencies_args.php delete mode 100644 thrift/jaeger/Agent/OperationSamplingStrategy.php delete mode 100644 thrift/jaeger/Agent/PerOperationSamplingStrategies.php delete mode 100644 thrift/jaeger/Agent/ProbabilisticSamplingStrategy.php delete mode 100644 thrift/jaeger/Agent/RateLimitingSamplingStrategy.php delete mode 100644 thrift/jaeger/Agent/SamplingManagerClient.php delete mode 100644 thrift/jaeger/Agent/SamplingManagerIf.php delete mode 100644 thrift/jaeger/Agent/SamplingManager_getSamplingStrategy_args.php delete mode 100644 thrift/jaeger/Agent/SamplingManager_getSamplingStrategy_result.php delete mode 100644 thrift/jaeger/Agent/SamplingStrategyResponse.php delete mode 100644 thrift/jaeger/Agent/SamplingStrategyType.php delete mode 100644 thrift/jaeger/Agent/ServiceThrottlingConfig.php delete mode 100644 thrift/jaeger/Agent/ThrottlingConfig.php delete mode 100644 thrift/jaeger/Agent/ThrottlingResponse.php delete mode 100644 thrift/jaeger/Agent/ThrottlingServiceClient.php delete mode 100644 thrift/jaeger/Agent/ThrottlingServiceIf.php delete mode 100644 thrift/jaeger/Agent/ThrottlingService_getThrottlingConfigs_args.php delete mode 100644 thrift/jaeger/Agent/ThrottlingService_getThrottlingConfigs_result.php delete mode 100644 thrift/jaeger/Agent/ValidateTraceResponse.php delete mode 100644 thrift/jaeger/Agent/Zipkin/Annotation.php delete mode 100644 thrift/jaeger/Agent/Zipkin/AnnotationType.php delete mode 100644 thrift/jaeger/Agent/Zipkin/BinaryAnnotation.php delete mode 100644 thrift/jaeger/Agent/Zipkin/Constant.php delete mode 100644 thrift/jaeger/Agent/Zipkin/Endpoint.php delete mode 100644 thrift/jaeger/Agent/Zipkin/Response.php delete mode 100644 thrift/jaeger/Agent/Zipkin/Span.php delete mode 100644 thrift/jaeger/Agent/Zipkin/ZipkinCollectorClient.php delete mode 100644 thrift/jaeger/Agent/Zipkin/ZipkinCollectorIf.php delete mode 100644 thrift/jaeger/Agent/Zipkin/ZipkinCollector_submitZipkinBatch_args.php delete mode 100644 thrift/jaeger/Agent/Zipkin/ZipkinCollector_submitZipkinBatch_result.php delete mode 100644 thrift/jaeger/Batch.php delete mode 100644 thrift/jaeger/BatchSubmitResponse.php delete mode 100644 thrift/jaeger/ClientStats.php delete mode 100644 thrift/jaeger/CollectorClient.php delete mode 100644 thrift/jaeger/CollectorIf.php delete mode 100644 thrift/jaeger/Collector_submitBatches_args.php delete mode 100644 thrift/jaeger/Collector_submitBatches_result.php delete mode 100644 thrift/jaeger/Crossdock/Downstream.php delete mode 100644 thrift/jaeger/Crossdock/JoinTraceRequest.php delete mode 100644 thrift/jaeger/Crossdock/ObservedSpan.php delete mode 100644 thrift/jaeger/Crossdock/StartTraceRequest.php delete mode 100644 thrift/jaeger/Crossdock/TraceResponse.php delete mode 100644 thrift/jaeger/Crossdock/TracedServiceClient.php delete mode 100644 thrift/jaeger/Crossdock/TracedServiceIf.php delete mode 100644 thrift/jaeger/Crossdock/TracedService_joinTrace_args.php delete mode 100644 thrift/jaeger/Crossdock/TracedService_joinTrace_result.php delete mode 100644 thrift/jaeger/Crossdock/TracedService_startTrace_args.php delete mode 100644 thrift/jaeger/Crossdock/TracedService_startTrace_result.php delete mode 100644 thrift/jaeger/Crossdock/Transport.php delete mode 100644 thrift/jaeger/Log.php delete mode 100644 thrift/jaeger/Process.php delete mode 100644 thrift/jaeger/README.md delete mode 100644 thrift/jaeger/Span.php delete mode 100644 thrift/jaeger/SpanRef.php delete mode 100644 thrift/jaeger/SpanRefType.php delete mode 100644 thrift/jaeger/Tag.php delete mode 100644 thrift/jaeger/TagType.php delete mode 100644 thrift/jaeger/composer.json diff --git a/.gitsplit.yml b/.gitsplit.yml index d1132ec29..463cfed52 100644 --- a/.gitsplit.yml +++ b/.gitsplit.yml @@ -8,8 +8,6 @@ project_url: "https://github.com/open-telemetry/opentelemetry-php.git" splits: - prefix: "proto/otel" target: "https://${GH_TOKEN}@github.com/opentelemetry-php/gen-otlp-protobuf.git" - - prefix: "thrift/jaeger" - target: "https://${GH_TOKEN}@github.com/opentelemetry-php/gen-jaeger-thrift.git" - prefix: "src/Context" target: "https://${GH_TOKEN}@github.com/opentelemetry-php/context.git" - prefix: "src/SemConv" @@ -20,8 +18,6 @@ splits: target: "https://${GH_TOKEN}@github.com/opentelemetry-php/sdk.git" - prefix: "src/Contrib" target: "https://${GH_TOKEN}@github.com/opentelemetry-php/sdk-contrib.git" - - prefix: "src/Contrib/Jaeger" - target: "https://${GH_TOKEN}@github.com/opentelemetry-php/exporter-jaeger.git" - prefix: "src/Contrib/Newrelic" target: "https://${GH_TOKEN}@github.com/opentelemetry-php/exporter-newrelic.git" - prefix: "src/Contrib/Otlp" diff --git a/.phan/config.php b/.phan/config.php index ec916289b..8e65007f6 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -319,7 +319,6 @@ 'exclude_analysis_directory_list' => [ 'vendor/', 'proto/', - 'thrift/', ], // Enable this to enable checks of require/include statements referring to valid paths. @@ -370,8 +369,6 @@ 'src', 'proto/otel/GPBMetadata', 'proto/otel/Opentelemetry', - 'thrift', - 'vendor/packaged/thrift', 'vendor/composer', 'vendor/grpc/grpc/src/lib', 'vendor/guzzlehttp', diff --git a/Makefile b/Makefile index ea84ee46b..66facb69d 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,6 @@ smoke-test-exporter-examples: FORCE ## Run (some) exporter smoke test examples # Note this does not include every exporter at the moment $(DOCKER_COMPOSE) up -d --remove-orphans $(DC_RUN_PHP) php ./examples/traces/features/exporters/zipkin.php - $(DC_RUN_PHP) php ./examples/traces/features/exporters/jaeger.php $(DC_RUN_PHP) php ./examples/traces/features/parent_span_example.php # The following examples do not use the DC_RUN_PHP global because they need environment variables. $(DOCKER_COMPOSE) run -e NEW_RELIC_ENDPOINT -e NEW_RELIC_INSERT_KEY --rm php php ./examples/traces/features/exporters/newrelic.php @@ -87,8 +86,6 @@ fiber-ffi-example: @$(DOCKER_COMPOSE) -f docker-compose.fiber-ffi.yaml -p opentelemetry-php_fiber-ffi-example up -d web protobuf: ## Generate protobuf files ./script/proto_gen.sh -thrift: ## Generate thrift files - ./script/thrift_gen.sh bash: ## bash shell into container $(DC_RUN_PHP) bash style: ## Run style check/fix diff --git a/README.md b/README.md index 1717f8bde..bf4b82474 100644 --- a/README.md +++ b/README.md @@ -59,8 +59,6 @@ The [open-telemetry/opentelemetry](https://packagist.org/packages/open-telemetry This repository also hosts and distributes generated client code used by individual components as separate packages. These packages are: - Generated [OTLP](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/otlp.md) ProtoBuf files: [open-telemetry/gen-otlp-protobuf](https://packagist.org/packages/open-telemetry/gen-otlp-protobuf) -- Generated [Jaeger](https://github.com/jaegertracing/jaeger-idl) Thrift files: - [open-telemetry/gen-jaeger-thrift](https://packagist.org/packages/open-telemetry/gen-jaeger-thrift) For now the generated code packages are meant to be only used by library components internally. @@ -308,7 +306,7 @@ See [examples/traces/demo](examples/traces/demo) for a working example. ### Trace examples -You can use the [zipkin](/examples/traces/exporters/zipkin.php) or [jaeger](/examples/traces/exporters/jaeger.php) example to test out the reference +You can use the [zipkin](/examples/traces/exporters/zipkin.php) example to test out the reference implementations. This example performs a sample trace with a grouping of 5 spans and exports the result to a local zipkin or jaeger instance. diff --git a/composer.json b/composer.json index cca5f6935..63d93c118 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,6 @@ "cloudevents/sdk-php": "^v1.0.1", "google/protobuf": "^3.3.0", "grpc/grpc": "^1.30", - "packaged/thrift": "^0.15.0", "php-http/async-client-implementation": "^1.0", "php-http/discovery": "^1.14", "promphp/prometheus_client_php": "^2.2.1", @@ -47,7 +46,6 @@ "replace": { "open-telemetry/api": "self.version", "open-telemetry/context": "self.version", - "open-telemetry/gen-jaeger-thrift": "self.version", "open-telemetry/gen-otlp-protobuf": "self.version", "open-telemetry/sdk": "self.version", "open-telemetry/sdk-contrib": "self.version", @@ -57,8 +55,7 @@ "psr-4": { "OpenTelemetry\\": "src/", "Opentelemetry\\Proto\\": "proto/otel/Opentelemetry/Proto/", - "GPBMetadata\\Opentelemetry\\": "proto/otel/GPBMetadata/Opentelemetry/", - "Jaeger\\Thrift\\": "thrift/jaeger/" + "GPBMetadata\\Opentelemetry\\": "proto/otel/GPBMetadata/Opentelemetry/" }, "files": [ "src/Context/fiber/initialize_fiber_handler.php", @@ -112,7 +109,6 @@ "suggest": { "ext-gmp": "To support unlimited number of synchronous metric readers", "ext-grpc": "To use the OTLP GRPC Exporter", - "ext-protobuf": "For more performant protobuf/grpc exporting", - "ext-sockets": "To use the Thrift UDP Exporter for the Jaeger Agent" + "ext-protobuf": "For more performant protobuf/grpc exporting" } } diff --git a/deptrac.yaml b/deptrac.yaml index 7cbbec347..b85cb908f 100644 --- a/deptrac.yaml +++ b/deptrac.yaml @@ -13,7 +13,6 @@ deptrac: paths: - ./src - ./proto - - ./thrift - ./tests exclude_files: - '#.*test.*#' @@ -80,14 +79,6 @@ deptrac: collectors: - type: className regex: ^Composer\\* - - name: Thrift - collectors: - - type: className - regex: ^Thrift\\* - - name: JaegerThrift - collectors: - - type: className - regex: ^Jaeger\\Thrift\\* ruleset: Context: @@ -107,12 +98,8 @@ deptrac: - +OtelProto - Grpc - Prometheus - - Thrift - - JaegerThrift Extension: - +API OtelProto: - GoogleProtobuf - Grpc - JaegerThrift: - - Thrift diff --git a/examples/traces/exporters/jaeger.php b/examples/traces/exporters/jaeger.php deleted file mode 100644 index 2fb9b0dbc..000000000 --- a/examples/traces/exporters/jaeger.php +++ /dev/null @@ -1,64 +0,0 @@ -create('http://jaeger:9412/api/v2/spans') -); -$tracerProvider = new TracerProvider( - new SimpleSpanProcessor($exporter), - new AlwaysOnSampler(), -); - -echo 'Starting Jaeger example'; - -$tracer = $tracerProvider->getTracer('io.opentelemetry.contrib.php'); - -$rootSpan = $tracer->spanBuilder('root')->startSpan(); -$scope = $rootSpan->activate(); - -for ($i = 0; $i < 5; $i++) { - // start a span, register some events - $span = $tracer->spanBuilder('session.generate.span-' . $i)->startSpan(); - - echo sprintf( - PHP_EOL . 'Exporting Trace: %s, Parent: %s, Span: %s', - $span->getContext()->getTraceId(), - $span->getParentContext()->getSpanId() ?: 'None', - $span->getContext()->getSpanId() - ); - - $span->setAttribute('remote_ip', '1.2.3.4') - ->setAttribute('country', 'USA'); - - $span->addEvent('found_login' . $i, [ - 'id' => $i, - 'username' => 'otuser' . $i, - ]); - $span->addEvent('generated_session', [ - 'id' => md5((string) microtime(true)), - ]); - - try { - throw new Exception('Record exception test event'); - } catch (Exception $exception) { - $span->recordException($exception); - } - - $span->end(); -} -$scope->detach(); -$rootSpan->end(); -echo PHP_EOL . 'Jaeger example complete! See the results at http://localhost:16686/'; - -echo PHP_EOL; - -$tracerProvider->shutdown(); diff --git a/examples/traces/exporters/jaeger_thrift.php b/examples/traces/exporters/jaeger_thrift.php deleted file mode 100644 index 4727f6d32..000000000 --- a/examples/traces/exporters/jaeger_thrift.php +++ /dev/null @@ -1,72 +0,0 @@ -getTracer('io.opentelemetry.contrib.php'); - -$rootSpan = $tracer->spanBuilder('root')->startSpan(); -$rootSpan->activate(); -echo PHP_EOL . sprintf( - 'Root Span: %s, Parent: %s, Span: %s', - $rootSpan->getContext()->getTraceId(), - $rootSpan->getParentContext()->getSpanId(), - $rootSpan->getContext()->getSpanId() -) . PHP_EOL; - -for ($i = 0; $i < 1; $i++) { - // start a span, register some events - $span = $tracer->spanBuilder('session.generate.span-' . $i)->startSpan(); - - echo sprintf( - PHP_EOL . 'Exporting Trace: %s, Parent: %s, Span: %s', - $span->getContext()->getTraceId(), - $span->getParentContext()->getSpanId() ?: 'None', - $span->getContext()->getSpanId() - ) . PHP_EOL; - - $span->setAttribute('remote_ip', '1.2.3.4') - ->setAttribute('country', 'USA'); - - $span->addEvent('found_login' . $i, [ - 'id' => $i, - 'username' => 'otuser' . $i, - ]); - $span->addEvent('generated_session', [ - 'id' => md5((string) microtime(true)), - ]); - - try { - throw new Exception('Record exception test event'); - } catch (Exception $exception) { - $span->recordException($exception); - } - - $span->end(); -} -$rootSpan->end(); -echo PHP_EOL . 'Jaeger Thrift example complete! See the results at http://localhost:16686/'; - -echo PHP_EOL; - -$tracerProvider->shutdown(); diff --git a/examples/traces/exporters/zipkin.php b/examples/traces/exporters/zipkin.php index e89e1ca6e..8a57fd615 100644 --- a/examples/traces/exporters/zipkin.php +++ b/examples/traces/exporters/zipkin.php @@ -10,7 +10,6 @@ $transport = PsrTransportFactory::discover()->create('http://zipkin:9411/api/v2/spans', 'application/json'); $zipkinExporter = new ZipkinExporter( - 'alwaysOnZipkinExample', $transport ); $tracerProvider = new TracerProvider( diff --git a/examples/traces/features/parent_span_example.php b/examples/traces/features/parent_span_example.php index 7f6393f90..d940ed250 100644 --- a/examples/traces/features/parent_span_example.php +++ b/examples/traces/features/parent_span_example.php @@ -3,11 +3,9 @@ declare(strict_types=1); require __DIR__ . '/../../../vendor/autoload.php'; -use OpenTelemetry\Contrib\Jaeger\Exporter as JaegerExporter; use OpenTelemetry\Contrib\Zipkin\Exporter as ZipkinExporter; use OpenTelemetry\SDK\Common\Export\Http\PsrTransportFactory; use OpenTelemetry\SDK\Trace\Sampler\AlwaysOnSampler; -use OpenTelemetry\SDK\Trace\Span; use OpenTelemetry\SDK\Trace\SpanProcessor\SimpleSpanProcessor; use OpenTelemetry\SDK\Trace\TracerProvider; @@ -20,16 +18,9 @@ PsrTransportFactory::discover()->create('http://zipkin:9411/api/v2/spans') ); -// jaeger exporter -$jaegerExporter = new JaegerExporter( - $serviceName, - PsrTransportFactory::discover()->create('http://jaeger:9411/api/v2/spans') -); - $tracerProvider = new TracerProvider( [ new SimpleSpanProcessor($zipkinExporter), - new SimpleSpanProcessor($jaegerExporter), ], $sampler ); @@ -74,7 +65,6 @@ echo ' - ' . $secondRootSpan->getContext()->getTraceId() . PHP_EOL; echo PHP_EOL; echo 'See the results at' . PHP_EOL; -echo 'Jaeger: http://localhost:16686/' . PHP_EOL; echo 'Zipkin: http://localhost:9411/' . PHP_EOL; $tracerProvider->shutdown(); diff --git a/examples/traces/troubleshooting/logging_of_span_data.php b/examples/traces/troubleshooting/logging_of_span_data.php index dc3042e2d..74b84fe05 100644 --- a/examples/traces/troubleshooting/logging_of_span_data.php +++ b/examples/traces/troubleshooting/logging_of_span_data.php @@ -14,7 +14,7 @@ * will be the last log entry */ -use OpenTelemetry\Contrib\Jaeger\Exporter as JaegerExporter; +use OpenTelemetry\Contrib\Zipkin\Exporter as ZipkinExporter; use OpenTelemetry\SDK\Common\Export\Http\PsrTransportFactory; use OpenTelemetry\SDK\Common\Time\ClockFactory; use OpenTelemetry\SDK\Logs\SimplePsrFileLogger; @@ -35,14 +35,13 @@ /** * Create the Exporter. */ -$exporterEndpoint = 'http://jaeger:9412/api/v2/spans'; +$exporterEndpoint = 'http://zipkin:9411/api/v2/spans'; /** * If you want to simulate a connection error, uncomment the next line */ -//$exporterEndpoint = 'http://example.com:9412/api/v2/spans'; -$exporter = new JaegerExporter( - 'alwaysOnJaegerExample', - PsrTransportFactory::discover()->create('http://jaeger:9412/api/v2/spans', 'application/json'), +//$exporterEndpoint = 'http://example.com:9411/api/v2/spans'; +$exporter = new ZipkinExporter( + PsrTransportFactory::discover()->create($exporterEndpoint, 'application/json'), ); /** * Decorate the Exporter diff --git a/phpmetrics.json b/phpmetrics.json index 27d84fe71..7ff1e51d2 100644 --- a/phpmetrics.json +++ b/phpmetrics.json @@ -4,8 +4,7 @@ ], "exclude": [ "tests", - "proto", - "thrift" + "proto" ], "report": { "html": "var/metrics", diff --git a/script/thrift_gen.sh b/script/thrift_gen.sh deleted file mode 100755 index 23fd1bd03..000000000 --- a/script/thrift_gen.sh +++ /dev/null @@ -1,28 +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' jaegertracing/thrift:0.13 thrift -o /data/jaeger-idl" -THRIFT_CMD="${THRIFT} --gen php" - -# 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 thrift -mkdir -p thrift -mv jaeger-idl/gen-php/Jaeger/Thrift thrift/jaeger - -# remove thrift files -rm -rf jaeger-idl \ No newline at end of file diff --git a/src/Contrib/Jaeger/AgentExporter.php b/src/Contrib/Jaeger/AgentExporter.php deleted file mode 100644 index 6ac19b324..000000000 --- a/src/Contrib/Jaeger/AgentExporter.php +++ /dev/null @@ -1,57 +0,0 @@ -validateHost() //This is because the host is required downstream - ->validatePort(); //This is because the port is required downstream - - $this->spanConverter = new SpanConverter(); - $this->jaegerTransport = new JaegerTransport($parsedEndpoint); - $this->defaultServiceName = ResourceInfoFactory::defaultResource()->getAttributes()->get(ResourceAttributes::SERVICE_NAME); - } - - public function closeAgentConnection(): void - { - $this->jaegerTransport->close(); - } - - public function doExport(iterable $spans): bool - { - // UDP Transport begins here after converting to thrift format span - foreach ($spans as $span) { - $serviceName = $span->getResource()->getAttributes()->get(ResourceAttributes::SERVICE_NAME) - ?? - $this->defaultServiceName; - $this->jaegerTransport->append( - $this->spanConverter->convert([$span])[0], - $serviceName - ); - } - - return true; - } -} diff --git a/src/Contrib/Jaeger/BatchAdapter/BatchAdapter.php b/src/Contrib/Jaeger/BatchAdapter/BatchAdapter.php deleted file mode 100644 index 62e4df055..000000000 --- a/src/Contrib/Jaeger/BatchAdapter/BatchAdapter.php +++ /dev/null @@ -1,23 +0,0 @@ -batchInstance = new Batch($values); - } - - public function write(TProtocol $output): void - { - $this->batchInstance->write($output); - } -} diff --git a/src/Contrib/Jaeger/BatchAdapter/BatchAdapterFactory.php b/src/Contrib/Jaeger/BatchAdapter/BatchAdapterFactory.php deleted file mode 100644 index 883a4a1fe..000000000 --- a/src/Contrib/Jaeger/BatchAdapter/BatchAdapterFactory.php +++ /dev/null @@ -1,13 +0,0 @@ -validateHost(); //This is because the host is required downstream - - $this->sender = new HttpSender( - $client, - $requestFactory, - $streamFactory, - $parsedEndpoint - ); - } - - public function doExport(iterable $spans): bool - { - $this->sender->send($spans); - - return true; - } -} diff --git a/src/Contrib/Jaeger/HttpSender.php b/src/Contrib/Jaeger/HttpSender.php deleted file mode 100644 index 159d6bf2e..000000000 --- a/src/Contrib/Jaeger/HttpSender.php +++ /dev/null @@ -1,130 +0,0 @@ -protocol = new TBinaryProtocol( - new ThriftHttpTransport( - $client, - $requestFactory, - $streamFactory, - $parsedEndpoint - ) - ); - - $this->batchAdapterFactory = $batchAdapterFactory ?? new BatchAdapterFactory(); - $this->defaultServiceName = ResourceInfoFactory::defaultResource()->getAttributes()->get(ResourceAttributes::SERVICE_NAME); - } - - public function send(iterable $spans): void - { - $batches = $this->createBatchesPerResource( - self::groupSpansByResource($spans) - ); - - foreach ($batches as $batch) { - $this->sendBatch($batch); - } - } - - private static function groupSpansByResource(iterable $spans): array - { - $spansGroupedByResource = []; - foreach ($spans as $span) { - /** @var ResourceInfo */ - $resource = $span->getResource(); - $resourceAsKey = $resource->serialize(); - - if (!isset($spansGroupedByResource[$resourceAsKey])) { - $spansGroupedByResource[$resourceAsKey] = [ - 'spans' => [], - 'resource' => $resource, - ]; - } - - $spansGroupedByResource[$resourceAsKey]['spans'][] = $span; - } - - return $spansGroupedByResource; - } - - private function createBatchesPerResource(array $spansGroupedByResource): array - { - $batches = []; - foreach ($spansGroupedByResource as $unused => $dataForBatch) { - $batch = $this->batchAdapterFactory->create([ - 'spans' => (new SpanConverter())->convert( - $dataForBatch['spans'] - ), - 'process' => $this->createProcessFromResource( - $dataForBatch['resource'] - ), - ]); - - $batches[] = $batch; - } - - return $batches; - } - - private function createProcessFromResource(ResourceInfo $resource): Process - { - //Defaulting to (what should be) the default resource's service name - $serviceName = $this->defaultServiceName; - - $tags = []; - foreach ($resource->getAttributes() as $key => $value) { - if ($key === ResourceAttributes::SERVICE_NAME) { - $serviceName = (string) $value; - - continue; - } - - $tags[] = TagFactory::create($key, $value); - } - - return new Process([ - 'serviceName' => $serviceName, - 'tags' => $tags, - ]); - } - - private function sendBatch(BatchAdapterInterface $batch): void - { - $batch->write($this->protocol); - $this->protocol->getTransport()->flush(); - } -} diff --git a/src/Contrib/Jaeger/IdConverter.php b/src/Contrib/Jaeger/IdConverter.php deleted file mode 100644 index c88f8bcbd..000000000 --- a/src/Contrib/Jaeger/IdConverter.php +++ /dev/null @@ -1,41 +0,0 @@ - $traceIdLow, - 'traceIdHigh' => $traceIdHigh, - ]; - } - - public static function convertOtelToJaegerSpanId(string $spanId): int - { - return self::convert16CharHexStringToSignedInt($spanId); - } - - /** - * PHP has the limitation to correctly convert int64 from the 16 character hex only - * @param string $hex - * @return int - */ - private static function convert16CharHexStringToSignedInt(string $hex): int - { - $hi = intval(substr($hex, -16, -8), 16); - $lo = intval(substr($hex, -8, 8), 16); - - return $hi << 32 | $lo; - } -} diff --git a/src/Contrib/Jaeger/JaegerTransport.php b/src/Contrib/Jaeger/JaegerTransport.php deleted file mode 100644 index d14ad4273..000000000 --- a/src/Contrib/Jaeger/JaegerTransport.php +++ /dev/null @@ -1,114 +0,0 @@ -transport = new ThriftUdpTransport($parsedEndpoint); - $p = new TCompactProtocol($this->transport); - $this->client = new AgentClient($p, $p); - - $this->maxBufferSize = ($maxBufferSize > 0 ? $maxBufferSize : self::DEFAULT_BUFFER_SIZE); - } - - /** - * Submits a new span to collectors, possibly delayed and/or with buffering. - * - * @param Span $span - */ - public function append(Span $span, $serviceName): int - { - // Grab a copy of the process data, if we didn't already. - if ($this->process == null) { - $this->process = new Process([ - 'serviceName' => $serviceName, - 'tags' => $span->tags, - ]); - } - - $this->buffer[] = $span; - - // TODO(tylerc): Buffer spans and send them in as few UDP packets as possible. - return $this->flush(); - } - - /** - * Flush submits the internal buffer to the remote server. It returns the - * number of spans flushed. - * - * @param bool $force - force a flush, even on a partial buffer - */ - public function flush($force = false): int - { - $spans = count($this->buffer); - - // buffer not full yet - if (!$force && $spans < $this->maxBufferSize) { - return 0; - } - - // no spans to flush - if ($spans <= 0) { - return 0; - } - - try { - // emit a batch - $this->client->emitBatch(new Batch([ - 'process' => $this->process, - 'spans' => $this->buffer, - ])); - - // flush the UDP data - $this->transport->flush(); - - // reset the internal buffer - $this->buffer = []; - - // reset the process tag - $this->process = null; - } catch (TTransportException $e) { - self::logError('jaeger: transport failure', ['exception' => $e]); - - return 0; - } - - return $spans; - } - - /** - * Does a clean shutdown of the reporter, flushing any traces that may be - * buffered in memory. - */ - public function close(): void - { - $this->flush(true); // flush all remaining data - $this->transport->close(); - } -} diff --git a/src/Contrib/Jaeger/ParsedEndpointUrl.php b/src/Contrib/Jaeger/ParsedEndpointUrl.php deleted file mode 100644 index a26193fbb..000000000 --- a/src/Contrib/Jaeger/ParsedEndpointUrl.php +++ /dev/null @@ -1,65 +0,0 @@ -endpointUrl = $endpointUrl; - - $this->parsedDsn = parse_url($this->endpointUrl); - - if (!is_array($this->parsedDsn)) { - throw new InvalidArgumentException('Unable to parse provided DSN for url: ' . $this->endpointUrl); - } - } - - public function getEndpointUrl(): string - { - return $this->endpointUrl; - } - - public function validateHost(): self - { - $this->validateUrlComponent('host'); - - return $this; - } - - public function getHost(): string - { - $this->validateHost(); - - return $this->parsedDsn['host']; - } - - public function validatePort(): self - { - $this->validateUrlComponent('port'); - - return $this; - } - - public function getPort(): int - { - $this->validatePort(); - - return $this->parsedDsn['port']; - } - - private function validateUrlComponent(string $componentName): void - { - if (!isset($this->parsedDsn[$componentName])) { - throw new InvalidArgumentException($this->endpointUrl . ' is missing the ' . $componentName); - } - } -} diff --git a/src/Contrib/Jaeger/README.md b/src/Contrib/Jaeger/README.md deleted file mode 100644 index 9de46a902..000000000 --- a/src/Contrib/Jaeger/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# OpenTelemetry Jaeger Exporter - -A Jaeger exporter for OpenTelemetry. - -## Usage - -### HTTP (Zipkin) -https://github.com/open-telemetry/opentelemetry-php/blob/main/examples/traces/features/exporters/jaeger.php - -### Thrift -https://github.com/open-telemetry/opentelemetry-php/blob/main/examples/traces/features/exporters/jaeger_thrift.php \ No newline at end of file diff --git a/src/Contrib/Jaeger/SpanConverter.php b/src/Contrib/Jaeger/SpanConverter.php deleted file mode 100644 index 449e0cca1..000000000 --- a/src/Contrib/Jaeger/SpanConverter.php +++ /dev/null @@ -1,237 +0,0 @@ -convertSpan($span); - } - - return $aggregate; - } - - private function convertSpan(SpanDataInterface $span): JTSpan - { - [ - 'traceIdLow' => $traceIdLow, - 'traceIdHigh' => $traceIdHigh, - 'spanId' => $spanId, - 'parentSpanId' => $parentSpanId, - ] = self::convertOtelToJaegerIds($span); - - $startTime = TimeUtil::nanosToMicros($span->getStartEpochNanos()); - $duration = TimeUtil::nanosToMicros($span->getEndEpochNanos() - $span->getStartEpochNanos()); - - $tags = self::convertOtelSpanDataToJaegerTags($span); - - $logs = self::convertOtelEventsToJaegerLogs($span); - - $references = self::convertOtelLinksToJaegerSpanReferences($span); - - return new JTSpan([ - 'traceIdLow' => $traceIdLow, - 'traceIdHigh' => $traceIdHigh, - 'spanId' => $spanId, - 'parentSpanId' => $parentSpanId, - 'operationName' => $span->getName(), - 'flags' => $span->getContext()->getTraceFlags(), - 'startTime' => $startTime, - 'duration' => ($duration < 0) ? 0 : $duration, - 'tags' => $tags, - 'logs' => $logs, - 'references' => $references, - ]); - } - - private static function convertOtelToJaegerIds(SpanDataInterface $span): array - { - [ - 'traceIdLow' => $traceIdLow, - 'traceIdHigh' => $traceIdHigh - ] = IdConverter::convertOtelToJaegerTraceIds($span->getContext()->getTraceID()); - - $spanId = IdConverter::convertOtelToJaegerSpanId($span->getContext()->getSpanID()); - $parentSpanId = IdConverter::convertOtelToJaegerSpanId($span->getParentSpanId()); - - return [ - 'traceIdLow' => $traceIdLow, - 'traceIdHigh' => $traceIdHigh, - 'spanId' => $spanId, - 'parentSpanId' => $parentSpanId, - ]; - } - - private static function convertOtelSpanKindToJaeger(SpanDataInterface $span): ?string - { - switch ($span->getKind()) { - case SpanKind::KIND_CLIENT: - return self::JAEGER_SPAN_KIND_CLIENT; - case SpanKind::KIND_SERVER: - return self::JAEGER_SPAN_KIND_SERVER; - case SpanKind::KIND_CONSUMER: - return self::JAEGER_SPAN_KIND_CONSUMER; - case SpanKind::KIND_PRODUCER: - return self::JAEGER_SPAN_KIND_PRODUCER; - case SpanKind::KIND_INTERNAL: - return null; - } - - return null; - } - - private static function convertOtelSpanDataToJaegerTags(SpanDataInterface $span): array - { - $tags = []; - - if ($span->getStatus()->getCode() !== StatusCode::STATUS_UNSET) { - switch ($span->getStatus()->getCode()) { - case StatusCode::STATUS_OK: - $tags[self::STATUS_CODE_TAG_KEY] = self::STATUS_OK; - - break; - case StatusCode::STATUS_ERROR: - $tags[self::KEY_ERROR_FLAG] = true; - $tags[self::STATUS_CODE_TAG_KEY] = self::STATUS_ERROR; - - break; - } - - if (!empty($span->getStatus()->getDescription())) { - $tags[self::STATUS_DESCRIPTION_TAG_KEY] = $span->getStatus()->getDescription(); - } - } - - if (!empty($span->getInstrumentationScope()->getName())) { - $tags[SpanConverter::KEY_INSTRUMENTATION_SCOPE_NAME] = $span->getInstrumentationScope()->getName(); - } - - if ($span->getInstrumentationScope()->getVersion() !== null) { - $tags[SpanConverter::KEY_INSTRUMENTATION_SCOPE_VERSION] = $span->getInstrumentationScope()->getVersion(); - } - - $jaegerSpanKind = self::convertOtelSpanKindToJaeger($span); - if ($jaegerSpanKind !== null) { - $tags[self::KEY_SPAN_KIND] = $jaegerSpanKind; - } - - foreach ($span->getAttributes() as $k => $v) { - $tags[$k] = $v; - } - - foreach ($span->getResource()->getAttributes() as $k => $v) { - $tags[$k] = $v; - } - foreach ($span->getInstrumentationScope()->getAttributes() as $k => $v) { - $tags[$k] = $v; - } - - return self::buildTags($tags); - } - - private static function buildTags(array $tagPairs): array - { - $tags = []; - foreach ($tagPairs as $key => $value) { - $tags[] = TagFactory::create($key, $value); - } - - return $tags; - } - - private static function convertOtelEventsToJaegerLogs(SpanDataInterface $span): array - { - return array_map( - fn ($event) => self::convertSingleOtelEventToJaegerLog($event), - $span->getEvents() - ); - } - - private static function convertSingleOtelEventToJaegerLog(EventInterface $event): Log - { - $timestamp = TimeUtil::nanosToMicros($event->getEpochNanos()); - - $eventValue = $event->getAttributes()->get(self::EVENT_ATTRIBUTE_KEY_NAMED_EVENT) ?? $event->getName(); - $attributes = $event->getAttributes()->toArray(); - $attributes[self::JAEGER_KEY_EVENT] = $eventValue; - $attributesAsTags = self::buildTags($attributes); - - return new Log([ - 'timestamp' => $timestamp, - 'fields' => $attributesAsTags, - ]); - } - - private static function convertOtelLinksToJaegerSpanReferences(SpanDataInterface $span): array - { - return array_map( - fn ($link) => self::convertSingleOtelLinkToJaegerSpanReference($link), - $span->getLinks() - ); - } - - private static function convertSingleOtelLinkToJaegerSpanReference(LinkInterface $link): SpanRef - { - [ - 'traceIdLow' => $traceIdLow, - 'traceIdHigh' => $traceIdHigh, - ] = IdConverter::convertOtelToJaegerTraceIds($link->getSpanContext()->getTraceId()); - - $integerSpanId = IdConverter::convertOtelToJaegerSpanId($link->getSpanContext()->getSpanId()); - - return new SpanRef([ - 'refType' => SpanRefType::FOLLOWS_FROM, - 'traceIdLow' => $traceIdLow, - 'traceIdHigh' => $traceIdHigh, - 'spanId' => $integerSpanId, - ]); - } -} diff --git a/src/Contrib/Jaeger/TagFactory/TagFactory.php b/src/Contrib/Jaeger/TagFactory/TagFactory.php deleted file mode 100644 index 946a49e7f..000000000 --- a/src/Contrib/Jaeger/TagFactory/TagFactory.php +++ /dev/null @@ -1,86 +0,0 @@ - $key, - 'vType' => TagType::BOOL, - 'vBool' => $value, - ]); - } - - if (is_int($value)) { - return new Tag([ - 'key' => $key, - 'vType' => TagType::LONG, - 'vLong' => $value, - ]); - } - - if (is_numeric($value)) { - return new Tag([ - 'key' => $key, - 'vType' => TagType::DOUBLE, - 'vDouble' => $value, - ]); - } - - return new Tag([ - 'key' => $key, - 'vType' => TagType::STRING, - 'vStr' => (string) $value, - ]); - } - - private static function serializeArrayToString(array $arrayToSerialize): string - { - return self::recursivelySerializeArray($arrayToSerialize); - } - - private static function recursivelySerializeArray($value): string - { - if (is_array($value)) { - return implode(',', array_map(fn ($val) => self::recursivelySerializeArray($val), $value)); - } - - // Casting false to string makes an empty string - if (is_bool($value)) { - return $value ? 'true' : 'false'; - } - - // Floats will lose precision if their string representation - // is >=14 or >=17 digits, depending on PHP settings. - // Can also throw E_RECOVERABLE_ERROR if $value is an object - // without a __toString() method. - // This is possible because OpenTelemetry\Trace\Span does not verify - // setAttribute() $value input. - return (string) $value; - } -} diff --git a/src/Contrib/Jaeger/ThriftHttpTransport.php b/src/Contrib/Jaeger/ThriftHttpTransport.php deleted file mode 100644 index 9461de5eb..000000000 --- a/src/Contrib/Jaeger/ThriftHttpTransport.php +++ /dev/null @@ -1,101 +0,0 @@ -psr18Client = $client; - $this->requestFactory = $requestFactory; - $this->streamFactory = $streamFactory; - - $this->parsedEndpoint = $parsedEndpoint; - } - - public function isOpen() - { - throw new BadMethodCallException(__FUNCTION__ . " is unused as of this writing. See Thrift\Transport\THttpClient for a reference implementation."); - } - - public function open() - { - throw new BadMethodCallException(__FUNCTION__ . " is unused as of this writing. See Thrift\Transport\THttpClient for a reference implementation."); - } - - public function close() - { - throw new BadMethodCallException(__FUNCTION__ . " is unused as of this writing. See Thrift\Transport\THttpClient for a reference implementation."); - } - - public function read($len) - { - throw new BadMethodCallException(__FUNCTION__ . " is unused as of this writing. See Thrift\Transport\THttpClient for a reference implementation."); - } - - /** - * Writes some data into the pending buffer - * - * @param string $buf The data to write - */ - public function write($buf) - { - $this->buffer .= $buf; - } - - /** - * Opens and sends the actual request over the HTTP connection - */ - public function flush() - { - $endpointUrl = $this->parsedEndpoint->getEndpointUrl(); - $host = $this->parsedEndpoint->getHost(); - - $request = $this->requestFactory->createRequest('POST', $endpointUrl); - - $headers = [ - 'Host' => $host, //Port will be implied - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Host - 'Accept' => 'application/x-thrift', - 'User-Agent' => 'PHP/THttpClient', - 'Content-Type' => 'application/x-thrift', - 'Content-Length' => TStringFuncFactory::create()->strlen($this->buffer), - ]; - foreach ($headers as $key => $value) { - $request = $request->withAddedHeader($key, $value); - } - - $request = $request->withBody( - $this->streamFactory->createStream($this->buffer) - ); - - $this->psr18Client->sendRequest($request); - - $this->buffer = ''; - } -} diff --git a/src/Contrib/Jaeger/ThriftUdpTransport.php b/src/Contrib/Jaeger/ThriftUdpTransport.php deleted file mode 100644 index c721f4268..000000000 --- a/src/Contrib/Jaeger/ThriftUdpTransport.php +++ /dev/null @@ -1,90 +0,0 @@ -server = $parsedEndpoint->getHost(); - $this->port = $parsedEndpoint->getPort(); - - // open a UDP socket to somewhere - if (!($this->socket = \socket_create(AF_INET, SOCK_DGRAM, SOL_UDP))) { - $errorcode = \socket_last_error(); - $errormsg = \socket_strerror($errorcode); - - error_log("jaeger: transport: Couldn't create socket: [$errorcode] $errormsg"); - - throw new TTransportException('unable to open UDP socket', TTransportException::UNKNOWN); - } - } - - public function isOpen() - { - return $this->socket != null; - } - - // Open does nothing as connection is opened on creation - // Required to maintain thrift.TTransport interface - public function open() - { - } - - public function close() - { - \socket_close($this->socket); - $this->socket = null; - } - - public function read($len) - { - // not implemented - return ''; - } - - public function write($buf) - { - // ensure that the data will still fit in a UDP packeg - if (strlen($this->buffer) + strlen($buf) > self::MAX_UDP_PACKET) { - throw new TTransportException('Data does not fit within one UDP packet', TTransportException::UNKNOWN); - } - - // buffer up some data - $this->buffer .= $buf; - } - - public function flush() - { - // no data to send; don't send a packet - if (strlen($this->buffer) == 0) { - return; - } - - // TODO(tylerc): This assumes that the whole buffer successfully sent... I believe - // that this should always be the case for UDP packets, but I could be wrong. - - // flush the buffer to the socket - if (!\socket_sendto($this->socket, $this->buffer, strlen($this->buffer), 0, $this->server, $this->port)) { - $errorcode = \socket_last_error(); - $errormsg = \socket_strerror($errorcode); - error_log("jaeger: transport: Could not flush data: [$errorcode] $errormsg"); - } - - $this->buffer = ''; // empty the buffer - } -} diff --git a/src/Contrib/Jaeger/TransportInterface.php b/src/Contrib/Jaeger/TransportInterface.php deleted file mode 100644 index 69199e78a..000000000 --- a/src/Contrib/Jaeger/TransportInterface.php +++ /dev/null @@ -1,33 +0,0 @@ -create('http://zipkin:9412/api/v2/spans') ), + ClockFactory::getDefault() ), ], ))->getTracer('W3C Trace-Context Test Service'); diff --git a/tests/Unit/Contrib/Jaeger/AgentExporterTest.php b/tests/Unit/Contrib/Jaeger/AgentExporterTest.php deleted file mode 100644 index eccf84517..000000000 --- a/tests/Unit/Contrib/Jaeger/AgentExporterTest.php +++ /dev/null @@ -1,29 +0,0 @@ -export([new SpanData()])->await(); - - $this->assertTrue($status); - - $exporter->closeAgentConnection(); - } -} diff --git a/tests/Unit/Contrib/Jaeger/IdConverterTest.php b/tests/Unit/Contrib/Jaeger/IdConverterTest.php deleted file mode 100644 index dcee98028..000000000 --- a/tests/Unit/Contrib/Jaeger/IdConverterTest.php +++ /dev/null @@ -1,56 +0,0 @@ -assertEquals(-72057594037927936, IdConverter::convertOtelToJaegerSpanId($hex)); - } - - public function test_correctly_converts_random_span_id() - { - // 16 char hex string - $hex = bin2hex(random_bytes(8)); - - $this->assertEquals($hex, $this->dechexWithLeadingZeroes(IdConverter::convertOtelToJaegerSpanId($hex))); - } - - public function test_correctly_converts_trace_id() - { - $hex = '0102030405060708090a0b0c0d0e0f10'; - - $traceId = IdConverter::convertOtelToJaegerTraceIds($hex); - - $this->assertEquals(72623859790382856, $traceId['traceIdHigh']); - $this->assertEquals(651345242494996240, $traceId['traceIdLow']); - } - - public function test_correctly_converts_random_trace_id() - { - // 32 char hex string - $hex = bin2hex(random_bytes(16)); - - $traceId = IdConverter::convertOtelToJaegerTraceIds($hex); - $convertedTraceId = $this->dechexWithLeadingZeroes($traceId['traceIdHigh']); - $convertedTraceId .= $this->dechexWithLeadingZeroes($traceId['traceIdLow']); - $this->assertEquals($hex, $convertedTraceId); - } - - private function dechexWithLeadingZeroes(int $num) - { - return str_pad(dechex($num), 16, '0', STR_PAD_LEFT); - } -} diff --git a/tests/Unit/Contrib/Jaeger/JaegerExporterTest.php b/tests/Unit/Contrib/Jaeger/JaegerExporterTest.php deleted file mode 100644 index 5baa3edf7..000000000 --- a/tests/Unit/Contrib/Jaeger/JaegerExporterTest.php +++ /dev/null @@ -1,27 +0,0 @@ -getClientInterfaceMock(), - $this->getRequestFactoryInterfaceMock(), - $this->getStreamFactoryInterfaceMock() - ); - - $status = $exporter->export([new SpanData()])->await(); - - $this->assertTrue($status); - } -} diff --git a/tests/Unit/Contrib/Jaeger/JaegerHttpSenderTest.php b/tests/Unit/Contrib/Jaeger/JaegerHttpSenderTest.php deleted file mode 100644 index 83716040d..000000000 --- a/tests/Unit/Contrib/Jaeger/JaegerHttpSenderTest.php +++ /dev/null @@ -1,185 +0,0 @@ - $serviceName - ] = $inputs; - - $mockBatchAdapterFactory = $this->createBatchAdapterFactoryMock(); - - /** - * @psalm-suppress PossiblyInvalidArgument - */ - $sender = new HttpSender( - $this->getClientInterfaceMock(), - $this->getRequestFactoryInterfaceMock(), - $this->getStreamFactoryInterfaceMock(), - $this->createParsedEndpointUrlMock(), - $mockBatchAdapterFactory - ); - - return [ - 'sender' => $sender, - 'mockBatchAdapterFactory' => $mockBatchAdapterFactory, - ]; - } - - private function createParsedEndpointUrlMock(): ParsedEndpointUrl - { - /** @var ParsedEndpointUrl */ - $mock = $this->createMock(ParsedEndpointUrl::class); - - return $mock; - } - - private function createBatchAdapterFactoryMock(): BatchAdapterFactoryInterface - { - return new class() implements BatchAdapterFactoryInterface { - //Just enough spy functionality for what was needed for now. Generalize and extend as needed - private array $interceptedValues = []; - - public function getInterceptedValues() - { - return $this->interceptedValues; - } - - public function create(array $values): BatchAdapterInterface - { - $this->interceptedValues[] = $values; - - $mockBatchAdapter = new class() implements BatchAdapterInterface { - public function write(TProtocol $output): void - { - } - }; - - return $mockBatchAdapter; - } - }; - } - - public function test_span_and_process_data_are_batched_by_resource(): void - { - [ - 'sender' => $sender, - 'mockBatchAdapterFactory' => $mockBatchAdapterFactory - ] = $this->createSenderAndMocks([ - 'serviceName' => 'nameOfThe1stLogicalApp', - ]); - - $spans = [ - (new SpanData())->setResource(ResourceInfo::create( - Attributes::create([]), //code should default service.name from how its set above - )), - (new SpanData())->setResource(ResourceInfo::create( - Attributes::create([ - 'service.name' => 'nameOfThe2ndLogicalApp', - ]), - )), - ]; - - $sender->send($spans); - - $interceptedValues = $mockBatchAdapterFactory->getInterceptedValues(); - $this->assertSame(2, count($interceptedValues)); - - //1st batch - $this->assertSame(1, count($interceptedValues[0]['spans'])); //Detailed tests for the span conversion live elsewhere - - //2nd batch - $this->assertSame(1, count($interceptedValues[1]['spans'])); //Detailed tests for the span conversion live elsewhere - } - - public function test_process_service_names_are_correctly_set_from_resource_attributes_or_the_default_service_name(): void - { - [ - 'sender' => $sender, - 'mockBatchAdapterFactory' => $mockBatchAdapterFactory - ] = $this->createSenderAndMocks([ - 'serviceName' => 'nameOfThe1stLogicalApp', - ]); - - $spans = [ - (new SpanData())->setResource(ResourceInfo::create( - Attributes::create([]), //code should default service.name from how its set above - )), - (new SpanData())->setResource(ResourceInfo::create( - Attributes::create([ - 'service.name' => 'nameOfThe2ndLogicalApp', - ]), - )), - ]; - - $sender->send($spans); - - $interceptedValues = $mockBatchAdapterFactory->getInterceptedValues(); - - //1st batch - $this->assertSame( - ResourceInfoFactory::defaultResource()->getAttributes()->get(ResourceAttributes::SERVICE_NAME), - $interceptedValues[0]['process']->serviceName - ); - - //2nd batch - $this->assertSame('nameOfThe2ndLogicalApp', $interceptedValues[1]['process']->serviceName); - } - - public function test_tags_are_correctly_set_from_resource_attributes(): void - { - [ - 'sender' => $sender, - 'mockBatchAdapterFactory' => $mockBatchAdapterFactory - ] = $this->createSenderAndMocks([ - 'serviceName' => 'someServiceName', - ]); - - $spans = [ - (new SpanData())->setResource(ResourceInfo::create( - Attributes::create([]), - )), - (new SpanData())->setResource(ResourceInfo::create( - Attributes::create([ - 'telemetry.sdk.name' => 'opentelemetry', - ]), - )), - ]; - - $sender->send($spans); - - $interceptedValues = $mockBatchAdapterFactory->getInterceptedValues(); - - //1st batch - $this->assertSame(0, count($interceptedValues[0]['process']->tags)); - - //2nd batch - $this->assertSame(1, count($interceptedValues[1]['process']->tags)); - - $this->assertSame('telemetry.sdk.name', $interceptedValues[1]['process']->tags[0]->key); - $this->assertSame('opentelemetry', $interceptedValues[1]['process']->tags[0]->vStr); - } -} diff --git a/tests/Unit/Contrib/Jaeger/JaegerSpanConverterTest.php b/tests/Unit/Contrib/Jaeger/JaegerSpanConverterTest.php deleted file mode 100644 index b3694ef62..000000000 --- a/tests/Unit/Contrib/Jaeger/JaegerSpanConverterTest.php +++ /dev/null @@ -1,237 +0,0 @@ -setName('otelSpanName'); - - [$convertedSpan] = (new SpanConverter())->convert([$span]); - - $this->assertSame(0, $convertedSpan->traceIdLow); - $this->assertSame(0, $convertedSpan->traceIdHigh); - $this->assertSame(0, $convertedSpan->spanId); - $this->assertSame(0, $convertedSpan->parentSpanId); - $this->assertSame('otelSpanName', $convertedSpan->operationName); - $this->assertSame([], $convertedSpan->references); - $this->assertSame(0, $convertedSpan->flags); - $this->assertSame(1505855794194009, $convertedSpan->startTime); - $this->assertSame(5271716, $convertedSpan->duration); - //See test below for structure of $convertedSpan->tags - $this->assertSame([], $convertedSpan->logs); - } - - public function test_should_correctly_generate_jaeger_thrift_tags() - { - $span = (new SpanData()) - ->setStatus( - new StatusData( - StatusCode::STATUS_OK, - 'status_description' - ) - ) - ->setInstrumentationScope(new InstrumentationScope( - 'instrumentation_scope_name', - 'instrumentation_scope_version', - null, - Attributes::create([]), - )) - ->addAttribute('keyForBoolean', true) - ->addAttribute('keyForArray', ['1stElement', '2ndElement', true]) - ->addAttribute('keyForInteger', 123) - ->addAttribute('keyForFloat', 1.00) - ->setResource( - ResourceInfo::create( - Attributes::create([ - 'telemetry.sdk.name' => 'opentelemetry', - 'telemetry.sdk.language' => 'php', - 'telemetry.sdk.version' => 'dev', - 'instance' => 'test-a', - 'service.name' => 'unknown_service:php', - ]) - ) - ); - - [$convertedSpan] = (new SpanConverter())->convert([$span]); - - $this->assertSame('otel.status_code', $convertedSpan->tags[0]->key); - $this->assertSame('OK', $convertedSpan->tags[0]->vStr); - - $this->assertSame('otel.status_description', $convertedSpan->tags[1]->key); - $this->assertSame('status_description', $convertedSpan->tags[1]->vStr); - - $this->assertSame('otel.scope.name', $convertedSpan->tags[2]->key); - $this->assertSame('instrumentation_scope_name', $convertedSpan->tags[2]->vStr); - - $this->assertSame('otel.scope.version', $convertedSpan->tags[3]->key); - $this->assertSame('instrumentation_scope_version', $convertedSpan->tags[3]->vStr); - - $this->assertSame('keyForBoolean', $convertedSpan->tags[4]->key); - $this->assertTrue($convertedSpan->tags[4]->vBool); - - $this->assertSame('keyForArray', $convertedSpan->tags[5]->key); - $this->assertSame('1stElement,2ndElement,true', $convertedSpan->tags[5]->vStr); - - $this->assertSame('keyForInteger', $convertedSpan->tags[6]->key); - $this->assertSame(123, $convertedSpan->tags[6]->vLong); - - $this->assertSame('keyForFloat', $convertedSpan->tags[7]->key); - $this->assertSame(1.00, $convertedSpan->tags[7]->vDouble); - - $this->assertSame('telemetry.sdk.name', $convertedSpan->tags[8]->key); - $this->assertSame('opentelemetry', $convertedSpan->tags[8]->vStr); - - $this->assertSame('telemetry.sdk.language', $convertedSpan->tags[9]->key); - $this->assertSame('php', $convertedSpan->tags[9]->vStr); - - $this->assertSame('telemetry.sdk.version', $convertedSpan->tags[10]->key); - $this->assertSame('dev', $convertedSpan->tags[10]->vStr); - - $this->assertSame('instance', $convertedSpan->tags[11]->key); - $this->assertSame('test-a', $convertedSpan->tags[11]->vStr); - - $this->assertSame('service.name', $convertedSpan->tags[12]->key); - $this->assertSame('unknown_service:php', $convertedSpan->tags[12]->vStr); - } - - public function test_should_correctly_convert_error_status_to_jaeger_thrift_tags() - { - $span = (new SpanData()) - ->setStatus( - new StatusData( - StatusCode::STATUS_ERROR, - '' - ) - ); - - [$convertedSpan] = (new SpanConverter())->convert([$span]); - - $this->assertSame('error', $convertedSpan->tags[0]->key); - $this->assertTrue($convertedSpan->tags[0]->vBool); - $this->assertSame('otel.status_code', $convertedSpan->tags[1]->key); - $this->assertSame('ERROR', $convertedSpan->tags[1]->vStr); - } - - /** - * @dataProvider provideSpanKindInputsAndExpectations - */ - public function test_should_correctly_convert_span_kind_to_jaeger_thrift_tags(int $spanKindInput, string $expectedJaegerTagValue) - { - $span = (new SpanData()) - ->setKind($spanKindInput); - - [$convertedSpan] = (new SpanConverter())->convert([$span]); - - $this->assertSame('span.kind', $convertedSpan->tags[0]->key); - $this->assertSame($expectedJaegerTagValue, $convertedSpan->tags[0]->vStr); - } - - public function provideSpanKindInputsAndExpectations() - { - yield [SpanKind::KIND_CLIENT, 'client']; - yield [SpanKind::KIND_SERVER, 'server']; - yield [SpanKind::KIND_CONSUMER, 'consumer']; - yield [SpanKind::KIND_PRODUCER, 'producer']; - } - - public function test_span_kind_internal_should_not_create_jaeger_thrift_tag() - { - $span = (new SpanData()) - ->setKind(SpanKind::KIND_INTERNAL); - - [$convertedSpan] = (new SpanConverter())->convert([$span]); - - $this->assertCount(0, $convertedSpan->tags); - } - - public function test_should_correctly_convert_span_event_to_jaeger_log() - { - $span = (new SpanData()) - ->setEvents( - [ - new Event( - 'eventName', - 1505855794194009601, - Attributes::create([ - 'eventAttributeKey' => 'eventAttributeValue', - ]) - ), - ] - ); - - [$convertedSpan] = (new SpanConverter())->convert([$span]); - - $this->assertSame(1505855794194009, $convertedSpan->logs[0]->timestamp); - - $this->assertSame('eventAttributeKey', $convertedSpan->logs[0]->fields[0]->key); - $this->assertSame('eventAttributeValue', $convertedSpan->logs[0]->fields[0]->vStr); - $this->assertSame('event', $convertedSpan->logs[0]->fields[1]->key); - $this->assertSame('eventName', $convertedSpan->logs[0]->fields[1]->vStr); - } - - public function test_should_use_event_attribute_from_event_if_present_for_jaeger_log() - { - $span = (new SpanData()) - ->setEvents( - [ - new Event( - 'eventName', - 1505855794194009601, - Attributes::create([ - 'event' => 'valueForTheEventAttributeOnTheEvent', - ]) - ), - ] - ); - - [$convertedSpan] = (new SpanConverter())->convert([$span]); - - $this->assertSame(1505855794194009, $convertedSpan->logs[0]->timestamp); - - $this->assertSame('event', $convertedSpan->logs[0]->fields[0]->key); - $this->assertSame('valueForTheEventAttributeOnTheEvent', $convertedSpan->logs[0]->fields[0]->vStr); - } - - public function test_should_correctly_convert_span_link_to_jaeger_span_reference() - { - $span = (new SpanData()) - ->setLinks( - [ - new Link( - SpanContext::getInvalid(), - Attributes::create([]), - ), - ] - ); - - [$convertedSpan] = (new SpanConverter())->convert([$span]); - - $this->assertSame(1, $convertedSpan->references[0]->refType); - $this->assertSame(0, $convertedSpan->references[0]->traceIdLow); - $this->assertSame(0, $convertedSpan->references[0]->traceIdHigh); - $this->assertSame(0, $convertedSpan->references[0]->spanId); - } -} diff --git a/tests/Unit/SDK/Common/Configuration/ConfigurationTest.php b/tests/Unit/SDK/Common/Configuration/ConfigurationTest.php index 64b5ead95..25a19a933 100644 --- a/tests/Unit/SDK/Common/Configuration/ConfigurationTest.php +++ b/tests/Unit/SDK/Common/Configuration/ConfigurationTest.php @@ -43,7 +43,7 @@ class ConfigurationTest extends TestCase private const TYPES = [ VariableTypes::STRING => [Variables::OTEL_SERVICE_NAME], VariableTypes::BOOL => [Variables::OTEL_EXPORTER_OTLP_INSECURE], - VariableTypes::INTEGER => [Variables::OTEL_EXPORTER_JAEGER_AGENT_PORT], + VariableTypes::INTEGER => [Variables::OTEL_BSP_MAX_QUEUE_SIZE], VariableTypes::ENUM => [Variables::OTEL_LOG_LEVEL], VariableTypes::LIST => [Variables::OTEL_PROPAGATORS], VariableTypes::MAP => [Variables::OTEL_RESOURCE_ATTRIBUTES], @@ -73,7 +73,7 @@ class ConfigurationTest extends TestCase private const LIBRARY_DEFAULTS = [ VariableTypes::STRING => [Variables::OTEL_EXPORTER_OTLP_ENDPOINT, 'http://localhost:4318'], VariableTypes::BOOL => [Variables::OTEL_EXPORTER_OTLP_INSECURE, false], - VariableTypes::INTEGER => [Variables::OTEL_EXPORTER_JAEGER_AGENT_PORT, 6831], + VariableTypes::INTEGER => [Variables::OTEL_BSP_MAX_QUEUE_SIZE, 2048], VariableTypes::ENUM => [Variables::OTEL_LOG_LEVEL, 'info'], VariableTypes::LIST => [Variables::OTEL_PROPAGATORS, ['tracecontext', 'baggage']], ]; @@ -416,7 +416,7 @@ public function typeProvider(): array return [ 'bool' => ['OTEL_EXPORTER_OTLP_INSECURE', VariableTypes::BOOL], 'string' => ['OTEL_SERVICE_NAME', VariableTypes::STRING], - 'integer' => ['OTEL_EXPORTER_JAEGER_AGENT_PORT', VariableTypes::INTEGER], + 'integer' => ['OTEL_BSP_MAX_QUEUE_SIZE', VariableTypes::INTEGER], 'enum' => ['OTEL_LOG_LEVEL', VariableTypes::ENUM], 'list' => ['OTEL_PROPAGATORS', VariableTypes::LIST], 'map' => ['OTEL_RESOURCE_ATTRIBUTES', VariableTypes::MAP], diff --git a/tests/Unit/SDK/Trace/ExporterFactoryTest.php b/tests/Unit/SDK/Trace/ExporterFactoryTest.php index 90b89979e..c39518f2c 100644 --- a/tests/Unit/SDK/Trace/ExporterFactoryTest.php +++ b/tests/Unit/SDK/Trace/ExporterFactoryTest.php @@ -107,7 +107,6 @@ public function test_throws_exception_for_invalid_or_unsupported_exporter_config public function invalidEnvProvider(): array { return [ - 'jaeger' => ['jaeger'], 'newrelic' => ['newrelic'], 'zipkintonewrelic' => ['zipkintonewrelic'], 'otlp+invalid protocol' => [ @@ -115,7 +114,7 @@ public function invalidEnvProvider(): array ['OTEL_EXPORTER_OTLP_PROTOCOL' => 'foo'], ], 'unknown exporter' => ['foo'], - 'multiple exporters' => ['jaeger,zipkin'], + 'multiple exporters' => ['newrelic,zipkin'], ]; } } diff --git a/thrift/jaeger/Agent/AgentClient.php b/thrift/jaeger/Agent/AgentClient.php deleted file mode 100644 index ff7c4b1bd..000000000 --- a/thrift/jaeger/Agent/AgentClient.php +++ /dev/null @@ -1,86 +0,0 @@ -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/thrift/jaeger/Agent/AgentIf.php b/thrift/jaeger/Agent/AgentIf.php deleted file mode 100644 index b022128c0..000000000 --- a/thrift/jaeger/Agent/AgentIf.php +++ /dev/null @@ -1,29 +0,0 @@ - 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)) { - if (isset($vals['batch'])) { - $this->batch = $vals['batch']; - } - } - } - - public function getName() - { - return 'Agent_emitBatch_args'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::STRUCT) { - $this->batch = new \Jaeger\Thrift\Batch(); - $xfer += $this->batch->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('Agent_emitBatch_args'); - if ($this->batch !== null) { - if (!is_object($this->batch)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('batch', TType::STRUCT, 1); - $xfer += $this->batch->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/Agent_emitZipkinBatch_args.php b/thrift/jaeger/Agent/Agent_emitZipkinBatch_args.php deleted file mode 100644 index b91d2c226..000000000 --- a/thrift/jaeger/Agent/Agent_emitZipkinBatch_args.php +++ /dev/null @@ -1,116 +0,0 @@ - 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)) { - if (isset($vals['spans'])) { - $this->spans = $vals['spans']; - } - } - } - - public function getName() - { - return 'Agent_emitZipkinBatch_args'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::LST) { - $this->spans = array(); - $_size0 = 0; - $_etype3 = 0; - $xfer += $input->readListBegin($_etype3, $_size0); - for ($_i4 = 0; $_i4 < $_size0; ++$_i4) { - $elem5 = null; - $elem5 = new \Jaeger\Thrift\Agent\Zipkin\Span(); - $xfer += $elem5->read($input); - $this->spans []= $elem5; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('Agent_emitZipkinBatch_args'); - if ($this->spans !== null) { - if (!is_array($this->spans)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('spans', TType::LST, 1); - $output->writeListBegin(TType::STRUCT, count($this->spans)); - foreach ($this->spans as $iter6) { - $xfer += $iter6->write($output); - } - $output->writeListEnd(); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/AggregationValidatorClient.php b/thrift/jaeger/Agent/AggregationValidatorClient.php deleted file mode 100644 index 4b3a1b2c2..000000000 --- a/thrift/jaeger/Agent/AggregationValidatorClient.php +++ /dev/null @@ -1,91 +0,0 @@ -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/thrift/jaeger/Agent/AggregationValidatorIf.php b/thrift/jaeger/Agent/AggregationValidatorIf.php deleted file mode 100644 index de544196e..000000000 --- a/thrift/jaeger/Agent/AggregationValidatorIf.php +++ /dev/null @@ -1,26 +0,0 @@ - array( - 'var' => 'traceId', - 'isRequired' => true, - 'type' => TType::STRING, - ), - ); - - /** - * @var string - */ - public $traceId = null; - - public function __construct($vals = null) - { - if (is_array($vals)) { - if (isset($vals['traceId'])) { - $this->traceId = $vals['traceId']; - } - } - } - - public function getName() - { - return 'AggregationValidator_validateTrace_args'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->traceId); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('AggregationValidator_validateTrace_args'); - if ($this->traceId !== null) { - $xfer += $output->writeFieldBegin('traceId', TType::STRING, 1); - $xfer += $output->writeString($this->traceId); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/AggregationValidator_validateTrace_result.php b/thrift/jaeger/Agent/AggregationValidator_validateTrace_result.php deleted file mode 100644 index cecf4ffc6..000000000 --- a/thrift/jaeger/Agent/AggregationValidator_validateTrace_result.php +++ /dev/null @@ -1,99 +0,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)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() - { - return 'AggregationValidator_validateTrace_result'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 0: - if ($ftype == TType::STRUCT) { - $this->success = new \Jaeger\Thrift\Agent\ValidateTraceResponse(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('AggregationValidator_validateTrace_result'); - if ($this->success !== null) { - if (!is_object($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/BaggageRestriction.php b/thrift/jaeger/Agent/BaggageRestriction.php deleted file mode 100644 index 1e535b4fc..000000000 --- a/thrift/jaeger/Agent/BaggageRestriction.php +++ /dev/null @@ -1,118 +0,0 @@ - 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)) { - if (isset($vals['baggageKey'])) { - $this->baggageKey = $vals['baggageKey']; - } - if (isset($vals['maxValueLength'])) { - $this->maxValueLength = $vals['maxValueLength']; - } - } - } - - public function getName() - { - return 'BaggageRestriction'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->baggageKey); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->maxValueLength); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('BaggageRestriction'); - if ($this->baggageKey !== null) { - $xfer += $output->writeFieldBegin('baggageKey', TType::STRING, 1); - $xfer += $output->writeString($this->baggageKey); - $xfer += $output->writeFieldEnd(); - } - if ($this->maxValueLength !== null) { - $xfer += $output->writeFieldBegin('maxValueLength', TType::I32, 2); - $xfer += $output->writeI32($this->maxValueLength); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/BaggageRestrictionManagerClient.php b/thrift/jaeger/Agent/BaggageRestrictionManagerClient.php deleted file mode 100644 index 29bf69031..000000000 --- a/thrift/jaeger/Agent/BaggageRestrictionManagerClient.php +++ /dev/null @@ -1,91 +0,0 @@ -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/thrift/jaeger/Agent/BaggageRestrictionManagerIf.php b/thrift/jaeger/Agent/BaggageRestrictionManagerIf.php deleted file mode 100644 index 66dea4a22..000000000 --- a/thrift/jaeger/Agent/BaggageRestrictionManagerIf.php +++ /dev/null @@ -1,30 +0,0 @@ - array( - 'var' => 'serviceName', - 'isRequired' => false, - 'type' => TType::STRING, - ), - ); - - /** - * @var string - */ - public $serviceName = null; - - public function __construct($vals = null) - { - if (is_array($vals)) { - if (isset($vals['serviceName'])) { - $this->serviceName = $vals['serviceName']; - } - } - } - - public function getName() - { - return 'BaggageRestrictionManager_getBaggageRestrictions_args'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->serviceName); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('BaggageRestrictionManager_getBaggageRestrictions_args'); - if ($this->serviceName !== null) { - $xfer += $output->writeFieldBegin('serviceName', TType::STRING, 1); - $xfer += $output->writeString($this->serviceName); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/BaggageRestrictionManager_getBaggageRestrictions_result.php b/thrift/jaeger/Agent/BaggageRestrictionManager_getBaggageRestrictions_result.php deleted file mode 100644 index f7e226acc..000000000 --- a/thrift/jaeger/Agent/BaggageRestrictionManager_getBaggageRestrictions_result.php +++ /dev/null @@ -1,116 +0,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)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() - { - return 'BaggageRestrictionManager_getBaggageRestrictions_result'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size0 = 0; - $_etype3 = 0; - $xfer += $input->readListBegin($_etype3, $_size0); - for ($_i4 = 0; $_i4 < $_size0; ++$_i4) { - $elem5 = null; - $elem5 = new \Jaeger\Thrift\Agent\BaggageRestriction(); - $xfer += $elem5->read($input); - $this->success []= $elem5; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('BaggageRestrictionManager_getBaggageRestrictions_result'); - if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - $output->writeListBegin(TType::STRUCT, count($this->success)); - foreach ($this->success as $iter6) { - $xfer += $iter6->write($output); - } - $output->writeListEnd(); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/Dependencies.php b/thrift/jaeger/Agent/Dependencies.php deleted file mode 100644 index 739399c27..000000000 --- a/thrift/jaeger/Agent/Dependencies.php +++ /dev/null @@ -1,116 +0,0 @@ - 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)) { - if (isset($vals['links'])) { - $this->links = $vals['links']; - } - } - } - - public function getName() - { - return 'Dependencies'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::LST) { - $this->links = array(); - $_size0 = 0; - $_etype3 = 0; - $xfer += $input->readListBegin($_etype3, $_size0); - for ($_i4 = 0; $_i4 < $_size0; ++$_i4) { - $elem5 = null; - $elem5 = new \Jaeger\Thrift\Agent\DependencyLink(); - $xfer += $elem5->read($input); - $this->links []= $elem5; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('Dependencies'); - if ($this->links !== null) { - if (!is_array($this->links)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('links', TType::LST, 1); - $output->writeListBegin(TType::STRUCT, count($this->links)); - foreach ($this->links as $iter6) { - $xfer += $iter6->write($output); - } - $output->writeListEnd(); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/DependencyClient.php b/thrift/jaeger/Agent/DependencyClient.php deleted file mode 100644 index a650ec5c1..000000000 --- a/thrift/jaeger/Agent/DependencyClient.php +++ /dev/null @@ -1,118 +0,0 @@ -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/thrift/jaeger/Agent/DependencyIf.php b/thrift/jaeger/Agent/DependencyIf.php deleted file mode 100644 index 118f2aeb3..000000000 --- a/thrift/jaeger/Agent/DependencyIf.php +++ /dev/null @@ -1,30 +0,0 @@ - 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)) { - if (isset($vals['parent'])) { - $this->parent = $vals['parent']; - } - if (isset($vals['child'])) { - $this->child = $vals['child']; - } - if (isset($vals['callCount'])) { - $this->callCount = $vals['callCount']; - } - } - } - - public function getName() - { - return 'DependencyLink'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->parent); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->child); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->callCount); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('DependencyLink'); - if ($this->parent !== null) { - $xfer += $output->writeFieldBegin('parent', TType::STRING, 1); - $xfer += $output->writeString($this->parent); - $xfer += $output->writeFieldEnd(); - } - if ($this->child !== null) { - $xfer += $output->writeFieldBegin('child', TType::STRING, 2); - $xfer += $output->writeString($this->child); - $xfer += $output->writeFieldEnd(); - } - if ($this->callCount !== null) { - $xfer += $output->writeFieldBegin('callCount', TType::I64, 4); - $xfer += $output->writeI64($this->callCount); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/Dependency_getDependenciesForTrace_args.php b/thrift/jaeger/Agent/Dependency_getDependenciesForTrace_args.php deleted file mode 100644 index 409c56b29..000000000 --- a/thrift/jaeger/Agent/Dependency_getDependenciesForTrace_args.php +++ /dev/null @@ -1,94 +0,0 @@ - array( - 'var' => 'traceId', - 'isRequired' => true, - 'type' => TType::STRING, - ), - ); - - /** - * @var string - */ - public $traceId = null; - - public function __construct($vals = null) - { - if (is_array($vals)) { - if (isset($vals['traceId'])) { - $this->traceId = $vals['traceId']; - } - } - } - - public function getName() - { - return 'Dependency_getDependenciesForTrace_args'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->traceId); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('Dependency_getDependenciesForTrace_args'); - if ($this->traceId !== null) { - $xfer += $output->writeFieldBegin('traceId', TType::STRING, 1); - $xfer += $output->writeString($this->traceId); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/Dependency_getDependenciesForTrace_result.php b/thrift/jaeger/Agent/Dependency_getDependenciesForTrace_result.php deleted file mode 100644 index 229b4d2e7..000000000 --- a/thrift/jaeger/Agent/Dependency_getDependenciesForTrace_result.php +++ /dev/null @@ -1,99 +0,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)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() - { - return 'Dependency_getDependenciesForTrace_result'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 0: - if ($ftype == TType::STRUCT) { - $this->success = new \Jaeger\Thrift\Agent\Dependencies(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('Dependency_getDependenciesForTrace_result'); - if ($this->success !== null) { - if (!is_object($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/Dependency_saveDependencies_args.php b/thrift/jaeger/Agent/Dependency_saveDependencies_args.php deleted file mode 100644 index 3c34c5c8e..000000000 --- a/thrift/jaeger/Agent/Dependency_saveDependencies_args.php +++ /dev/null @@ -1,99 +0,0 @@ - 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)) { - if (isset($vals['dependencies'])) { - $this->dependencies = $vals['dependencies']; - } - } - } - - public function getName() - { - return 'Dependency_saveDependencies_args'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::STRUCT) { - $this->dependencies = new \Jaeger\Thrift\Agent\Dependencies(); - $xfer += $this->dependencies->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('Dependency_saveDependencies_args'); - if ($this->dependencies !== null) { - if (!is_object($this->dependencies)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('dependencies', TType::STRUCT, 1); - $xfer += $this->dependencies->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/OperationSamplingStrategy.php b/thrift/jaeger/Agent/OperationSamplingStrategy.php deleted file mode 100644 index 902fcfce4..000000000 --- a/thrift/jaeger/Agent/OperationSamplingStrategy.php +++ /dev/null @@ -1,123 +0,0 @@ - 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)) { - if (isset($vals['operation'])) { - $this->operation = $vals['operation']; - } - if (isset($vals['probabilisticSampling'])) { - $this->probabilisticSampling = $vals['probabilisticSampling']; - } - } - } - - public function getName() - { - return 'OperationSamplingStrategy'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->operation); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->probabilisticSampling = new \Jaeger\Thrift\Agent\ProbabilisticSamplingStrategy(); - $xfer += $this->probabilisticSampling->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('OperationSamplingStrategy'); - if ($this->operation !== null) { - $xfer += $output->writeFieldBegin('operation', TType::STRING, 1); - $xfer += $output->writeString($this->operation); - $xfer += $output->writeFieldEnd(); - } - if ($this->probabilisticSampling !== null) { - if (!is_object($this->probabilisticSampling)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('probabilisticSampling', TType::STRUCT, 2); - $xfer += $this->probabilisticSampling->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/PerOperationSamplingStrategies.php b/thrift/jaeger/Agent/PerOperationSamplingStrategies.php deleted file mode 100644 index 59f9d9af2..000000000 --- a/thrift/jaeger/Agent/PerOperationSamplingStrategies.php +++ /dev/null @@ -1,188 +0,0 @@ - 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)) { - if (isset($vals['defaultSamplingProbability'])) { - $this->defaultSamplingProbability = $vals['defaultSamplingProbability']; - } - if (isset($vals['defaultLowerBoundTracesPerSecond'])) { - $this->defaultLowerBoundTracesPerSecond = $vals['defaultLowerBoundTracesPerSecond']; - } - if (isset($vals['perOperationStrategies'])) { - $this->perOperationStrategies = $vals['perOperationStrategies']; - } - if (isset($vals['defaultUpperBoundTracesPerSecond'])) { - $this->defaultUpperBoundTracesPerSecond = $vals['defaultUpperBoundTracesPerSecond']; - } - } - } - - public function getName() - { - return 'PerOperationSamplingStrategies'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::DOUBLE) { - $xfer += $input->readDouble($this->defaultSamplingProbability); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::DOUBLE) { - $xfer += $input->readDouble($this->defaultLowerBoundTracesPerSecond); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::LST) { - $this->perOperationStrategies = array(); - $_size0 = 0; - $_etype3 = 0; - $xfer += $input->readListBegin($_etype3, $_size0); - for ($_i4 = 0; $_i4 < $_size0; ++$_i4) { - $elem5 = null; - $elem5 = new \Jaeger\Thrift\Agent\OperationSamplingStrategy(); - $xfer += $elem5->read($input); - $this->perOperationStrategies []= $elem5; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::DOUBLE) { - $xfer += $input->readDouble($this->defaultUpperBoundTracesPerSecond); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('PerOperationSamplingStrategies'); - if ($this->defaultSamplingProbability !== null) { - $xfer += $output->writeFieldBegin('defaultSamplingProbability', TType::DOUBLE, 1); - $xfer += $output->writeDouble($this->defaultSamplingProbability); - $xfer += $output->writeFieldEnd(); - } - if ($this->defaultLowerBoundTracesPerSecond !== null) { - $xfer += $output->writeFieldBegin('defaultLowerBoundTracesPerSecond', TType::DOUBLE, 2); - $xfer += $output->writeDouble($this->defaultLowerBoundTracesPerSecond); - $xfer += $output->writeFieldEnd(); - } - if ($this->perOperationStrategies !== null) { - if (!is_array($this->perOperationStrategies)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('perOperationStrategies', TType::LST, 3); - $output->writeListBegin(TType::STRUCT, count($this->perOperationStrategies)); - foreach ($this->perOperationStrategies as $iter6) { - $xfer += $iter6->write($output); - } - $output->writeListEnd(); - $xfer += $output->writeFieldEnd(); - } - if ($this->defaultUpperBoundTracesPerSecond !== null) { - $xfer += $output->writeFieldBegin('defaultUpperBoundTracesPerSecond', TType::DOUBLE, 4); - $xfer += $output->writeDouble($this->defaultUpperBoundTracesPerSecond); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/ProbabilisticSamplingStrategy.php b/thrift/jaeger/Agent/ProbabilisticSamplingStrategy.php deleted file mode 100644 index a7fe5563c..000000000 --- a/thrift/jaeger/Agent/ProbabilisticSamplingStrategy.php +++ /dev/null @@ -1,94 +0,0 @@ - array( - 'var' => 'samplingRate', - 'isRequired' => true, - 'type' => TType::DOUBLE, - ), - ); - - /** - * @var double - */ - public $samplingRate = null; - - public function __construct($vals = null) - { - if (is_array($vals)) { - if (isset($vals['samplingRate'])) { - $this->samplingRate = $vals['samplingRate']; - } - } - } - - public function getName() - { - return 'ProbabilisticSamplingStrategy'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::DOUBLE) { - $xfer += $input->readDouble($this->samplingRate); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('ProbabilisticSamplingStrategy'); - if ($this->samplingRate !== null) { - $xfer += $output->writeFieldBegin('samplingRate', TType::DOUBLE, 1); - $xfer += $output->writeDouble($this->samplingRate); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/RateLimitingSamplingStrategy.php b/thrift/jaeger/Agent/RateLimitingSamplingStrategy.php deleted file mode 100644 index 7d15c8d2b..000000000 --- a/thrift/jaeger/Agent/RateLimitingSamplingStrategy.php +++ /dev/null @@ -1,94 +0,0 @@ - array( - 'var' => 'maxTracesPerSecond', - 'isRequired' => true, - 'type' => TType::I16, - ), - ); - - /** - * @var int - */ - public $maxTracesPerSecond = null; - - public function __construct($vals = null) - { - if (is_array($vals)) { - if (isset($vals['maxTracesPerSecond'])) { - $this->maxTracesPerSecond = $vals['maxTracesPerSecond']; - } - } - } - - public function getName() - { - return 'RateLimitingSamplingStrategy'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->maxTracesPerSecond); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('RateLimitingSamplingStrategy'); - if ($this->maxTracesPerSecond !== null) { - $xfer += $output->writeFieldBegin('maxTracesPerSecond', TType::I16, 1); - $xfer += $output->writeI16($this->maxTracesPerSecond); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/SamplingManagerClient.php b/thrift/jaeger/Agent/SamplingManagerClient.php deleted file mode 100644 index bd5f6461e..000000000 --- a/thrift/jaeger/Agent/SamplingManagerClient.php +++ /dev/null @@ -1,91 +0,0 @@ -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/thrift/jaeger/Agent/SamplingManagerIf.php b/thrift/jaeger/Agent/SamplingManagerIf.php deleted file mode 100644 index 9eca93f9a..000000000 --- a/thrift/jaeger/Agent/SamplingManagerIf.php +++ /dev/null @@ -1,26 +0,0 @@ - array( - 'var' => 'serviceName', - 'isRequired' => false, - 'type' => TType::STRING, - ), - ); - - /** - * @var string - */ - public $serviceName = null; - - public function __construct($vals = null) - { - if (is_array($vals)) { - if (isset($vals['serviceName'])) { - $this->serviceName = $vals['serviceName']; - } - } - } - - public function getName() - { - return 'SamplingManager_getSamplingStrategy_args'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->serviceName); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('SamplingManager_getSamplingStrategy_args'); - if ($this->serviceName !== null) { - $xfer += $output->writeFieldBegin('serviceName', TType::STRING, 1); - $xfer += $output->writeString($this->serviceName); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/SamplingManager_getSamplingStrategy_result.php b/thrift/jaeger/Agent/SamplingManager_getSamplingStrategy_result.php deleted file mode 100644 index 7f7aca3a0..000000000 --- a/thrift/jaeger/Agent/SamplingManager_getSamplingStrategy_result.php +++ /dev/null @@ -1,99 +0,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)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() - { - return 'SamplingManager_getSamplingStrategy_result'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 0: - if ($ftype == TType::STRUCT) { - $this->success = new \Jaeger\Thrift\Agent\SamplingStrategyResponse(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('SamplingManager_getSamplingStrategy_result'); - if ($this->success !== null) { - if (!is_object($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/SamplingStrategyResponse.php b/thrift/jaeger/Agent/SamplingStrategyResponse.php deleted file mode 100644 index 14f453826..000000000 --- a/thrift/jaeger/Agent/SamplingStrategyResponse.php +++ /dev/null @@ -1,181 +0,0 @@ - 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)) { - if (isset($vals['strategyType'])) { - $this->strategyType = $vals['strategyType']; - } - if (isset($vals['probabilisticSampling'])) { - $this->probabilisticSampling = $vals['probabilisticSampling']; - } - if (isset($vals['rateLimitingSampling'])) { - $this->rateLimitingSampling = $vals['rateLimitingSampling']; - } - if (isset($vals['operationSampling'])) { - $this->operationSampling = $vals['operationSampling']; - } - } - } - - public function getName() - { - return 'SamplingStrategyResponse'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->strategyType); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->probabilisticSampling = new \Jaeger\Thrift\Agent\ProbabilisticSamplingStrategy(); - $xfer += $this->probabilisticSampling->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->rateLimitingSampling = new \Jaeger\Thrift\Agent\RateLimitingSamplingStrategy(); - $xfer += $this->rateLimitingSampling->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRUCT) { - $this->operationSampling = new \Jaeger\Thrift\Agent\PerOperationSamplingStrategies(); - $xfer += $this->operationSampling->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('SamplingStrategyResponse'); - if ($this->strategyType !== null) { - $xfer += $output->writeFieldBegin('strategyType', TType::I32, 1); - $xfer += $output->writeI32($this->strategyType); - $xfer += $output->writeFieldEnd(); - } - if ($this->probabilisticSampling !== null) { - if (!is_object($this->probabilisticSampling)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('probabilisticSampling', TType::STRUCT, 2); - $xfer += $this->probabilisticSampling->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->rateLimitingSampling !== null) { - if (!is_object($this->rateLimitingSampling)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('rateLimitingSampling', TType::STRUCT, 3); - $xfer += $this->rateLimitingSampling->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->operationSampling !== null) { - if (!is_object($this->operationSampling)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('operationSampling', TType::STRUCT, 4); - $xfer += $this->operationSampling->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/SamplingStrategyType.php b/thrift/jaeger/Agent/SamplingStrategyType.php deleted file mode 100644 index 0a7fa4042..000000000 --- a/thrift/jaeger/Agent/SamplingStrategyType.php +++ /dev/null @@ -1,30 +0,0 @@ - 'PROBABILISTIC', - 1 => 'RATE_LIMITING', - ); -} - diff --git a/thrift/jaeger/Agent/ServiceThrottlingConfig.php b/thrift/jaeger/Agent/ServiceThrottlingConfig.php deleted file mode 100644 index 8c70568f6..000000000 --- a/thrift/jaeger/Agent/ServiceThrottlingConfig.php +++ /dev/null @@ -1,123 +0,0 @@ - array( - 'var' => 'serviceName', - 'isRequired' => true, - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'config', - 'isRequired' => true, - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Agent\ThrottlingConfig', - ), - ); - - /** - * @var string - */ - public $serviceName = null; - /** - * @var \Jaeger\Thrift\Agent\ThrottlingConfig - */ - public $config = null; - - public function __construct($vals = null) - { - if (is_array($vals)) { - if (isset($vals['serviceName'])) { - $this->serviceName = $vals['serviceName']; - } - if (isset($vals['config'])) { - $this->config = $vals['config']; - } - } - } - - public function getName() - { - return 'ServiceThrottlingConfig'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->serviceName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->config = new \Jaeger\Thrift\Agent\ThrottlingConfig(); - $xfer += $this->config->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('ServiceThrottlingConfig'); - if ($this->serviceName !== null) { - $xfer += $output->writeFieldBegin('serviceName', TType::STRING, 1); - $xfer += $output->writeString($this->serviceName); - $xfer += $output->writeFieldEnd(); - } - if ($this->config !== null) { - if (!is_object($this->config)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('config', TType::STRUCT, 2); - $xfer += $this->config->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/ThrottlingConfig.php b/thrift/jaeger/Agent/ThrottlingConfig.php deleted file mode 100644 index 7ca2765f3..000000000 --- a/thrift/jaeger/Agent/ThrottlingConfig.php +++ /dev/null @@ -1,142 +0,0 @@ - array( - 'var' => 'maxOperations', - 'isRequired' => true, - 'type' => TType::I32, - ), - 2 => array( - 'var' => 'creditsPerSecond', - 'isRequired' => true, - 'type' => TType::DOUBLE, - ), - 3 => array( - 'var' => 'maxBalance', - 'isRequired' => true, - 'type' => TType::DOUBLE, - ), - ); - - /** - * @var int - */ - public $maxOperations = null; - /** - * @var double - */ - public $creditsPerSecond = null; - /** - * @var double - */ - public $maxBalance = null; - - public function __construct($vals = null) - { - if (is_array($vals)) { - if (isset($vals['maxOperations'])) { - $this->maxOperations = $vals['maxOperations']; - } - if (isset($vals['creditsPerSecond'])) { - $this->creditsPerSecond = $vals['creditsPerSecond']; - } - if (isset($vals['maxBalance'])) { - $this->maxBalance = $vals['maxBalance']; - } - } - } - - public function getName() - { - return 'ThrottlingConfig'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->maxOperations); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::DOUBLE) { - $xfer += $input->readDouble($this->creditsPerSecond); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::DOUBLE) { - $xfer += $input->readDouble($this->maxBalance); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('ThrottlingConfig'); - if ($this->maxOperations !== null) { - $xfer += $output->writeFieldBegin('maxOperations', TType::I32, 1); - $xfer += $output->writeI32($this->maxOperations); - $xfer += $output->writeFieldEnd(); - } - if ($this->creditsPerSecond !== null) { - $xfer += $output->writeFieldBegin('creditsPerSecond', TType::DOUBLE, 2); - $xfer += $output->writeDouble($this->creditsPerSecond); - $xfer += $output->writeFieldEnd(); - } - if ($this->maxBalance !== null) { - $xfer += $output->writeFieldBegin('maxBalance', TType::DOUBLE, 3); - $xfer += $output->writeDouble($this->maxBalance); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/ThrottlingResponse.php b/thrift/jaeger/Agent/ThrottlingResponse.php deleted file mode 100644 index f6f1abdcf..000000000 --- a/thrift/jaeger/Agent/ThrottlingResponse.php +++ /dev/null @@ -1,145 +0,0 @@ - array( - 'var' => 'defaultConfig', - 'isRequired' => true, - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Agent\ThrottlingConfig', - ), - 2 => array( - 'var' => 'serviceConfigs', - 'isRequired' => true, - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Agent\ServiceThrottlingConfig', - ), - ), - ); - - /** - * @var \Jaeger\Thrift\Agent\ThrottlingConfig - */ - public $defaultConfig = null; - /** - * @var \Jaeger\Thrift\Agent\ServiceThrottlingConfig[] - */ - public $serviceConfigs = null; - - public function __construct($vals = null) - { - if (is_array($vals)) { - if (isset($vals['defaultConfig'])) { - $this->defaultConfig = $vals['defaultConfig']; - } - if (isset($vals['serviceConfigs'])) { - $this->serviceConfigs = $vals['serviceConfigs']; - } - } - } - - public function getName() - { - return 'ThrottlingResponse'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::STRUCT) { - $this->defaultConfig = new \Jaeger\Thrift\Agent\ThrottlingConfig(); - $xfer += $this->defaultConfig->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::LST) { - $this->serviceConfigs = array(); - $_size0 = 0; - $_etype3 = 0; - $xfer += $input->readListBegin($_etype3, $_size0); - for ($_i4 = 0; $_i4 < $_size0; ++$_i4) { - $elem5 = null; - $elem5 = new \Jaeger\Thrift\Agent\ServiceThrottlingConfig(); - $xfer += $elem5->read($input); - $this->serviceConfigs []= $elem5; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('ThrottlingResponse'); - if ($this->defaultConfig !== null) { - if (!is_object($this->defaultConfig)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('defaultConfig', TType::STRUCT, 1); - $xfer += $this->defaultConfig->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->serviceConfigs !== null) { - if (!is_array($this->serviceConfigs)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('serviceConfigs', TType::LST, 2); - $output->writeListBegin(TType::STRUCT, count($this->serviceConfigs)); - foreach ($this->serviceConfigs as $iter6) { - $xfer += $iter6->write($output); - } - $output->writeListEnd(); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/ThrottlingServiceClient.php b/thrift/jaeger/Agent/ThrottlingServiceClient.php deleted file mode 100644 index 847cc4da6..000000000 --- a/thrift/jaeger/Agent/ThrottlingServiceClient.php +++ /dev/null @@ -1,91 +0,0 @@ -input_ = $input; - $this->output_ = $output ? $output : $input; - } - - - public function getThrottlingConfigs(array $serviceNames) - { - $this->send_getThrottlingConfigs($serviceNames); - return $this->recv_getThrottlingConfigs(); - } - - public function send_getThrottlingConfigs(array $serviceNames) - { - $args = new \Jaeger\Thrift\Agent\ThrottlingService_getThrottlingConfigs_args(); - $args->serviceNames = $serviceNames; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) { - thrift_protocol_write_binary( - $this->output_, - 'getThrottlingConfigs', - TMessageType::CALL, - $args, - $this->seqid_, - $this->output_->isStrictWrite() - ); - } else { - $this->output_->writeMessageBegin('getThrottlingConfigs', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_getThrottlingConfigs() - { - $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\ThrottlingService_getThrottlingConfigs_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\ThrottlingService_getThrottlingConfigs_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("getThrottlingConfigs failed: unknown result"); - } -} diff --git a/thrift/jaeger/Agent/ThrottlingServiceIf.php b/thrift/jaeger/Agent/ThrottlingServiceIf.php deleted file mode 100644 index 64b54cc36..000000000 --- a/thrift/jaeger/Agent/ThrottlingServiceIf.php +++ /dev/null @@ -1,26 +0,0 @@ - array( - 'var' => 'serviceNames', - 'isRequired' => false, - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - ); - - /** - * @var string[] - */ - public $serviceNames = null; - - public function __construct($vals = null) - { - if (is_array($vals)) { - if (isset($vals['serviceNames'])) { - $this->serviceNames = $vals['serviceNames']; - } - } - } - - public function getName() - { - return 'ThrottlingService_getThrottlingConfigs_args'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::LST) { - $this->serviceNames = array(); - $_size7 = 0; - $_etype10 = 0; - $xfer += $input->readListBegin($_etype10, $_size7); - for ($_i11 = 0; $_i11 < $_size7; ++$_i11) { - $elem12 = null; - $xfer += $input->readString($elem12); - $this->serviceNames []= $elem12; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('ThrottlingService_getThrottlingConfigs_args'); - if ($this->serviceNames !== null) { - if (!is_array($this->serviceNames)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('serviceNames', TType::LST, 1); - $output->writeListBegin(TType::STRING, count($this->serviceNames)); - foreach ($this->serviceNames as $iter13) { - $xfer += $output->writeString($iter13); - } - $output->writeListEnd(); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/ThrottlingService_getThrottlingConfigs_result.php b/thrift/jaeger/Agent/ThrottlingService_getThrottlingConfigs_result.php deleted file mode 100644 index e4a6b8dbc..000000000 --- a/thrift/jaeger/Agent/ThrottlingService_getThrottlingConfigs_result.php +++ /dev/null @@ -1,99 +0,0 @@ - array( - 'var' => 'success', - 'isRequired' => false, - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\Agent\ThrottlingResponse', - ), - ); - - /** - * @var \Jaeger\Thrift\Agent\ThrottlingResponse - */ - public $success = null; - - public function __construct($vals = null) - { - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() - { - return 'ThrottlingService_getThrottlingConfigs_result'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 0: - if ($ftype == TType::STRUCT) { - $this->success = new \Jaeger\Thrift\Agent\ThrottlingResponse(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('ThrottlingService_getThrottlingConfigs_result'); - if ($this->success !== null) { - if (!is_object($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/ValidateTraceResponse.php b/thrift/jaeger/Agent/ValidateTraceResponse.php deleted file mode 100644 index 593bb93e0..000000000 --- a/thrift/jaeger/Agent/ValidateTraceResponse.php +++ /dev/null @@ -1,118 +0,0 @@ - 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)) { - if (isset($vals['ok'])) { - $this->ok = $vals['ok']; - } - if (isset($vals['traceCount'])) { - $this->traceCount = $vals['traceCount']; - } - } - } - - public function getName() - { - return 'ValidateTraceResponse'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->ok); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->traceCount); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('ValidateTraceResponse'); - if ($this->ok !== null) { - $xfer += $output->writeFieldBegin('ok', TType::BOOL, 1); - $xfer += $output->writeBool($this->ok); - $xfer += $output->writeFieldEnd(); - } - if ($this->traceCount !== null) { - $xfer += $output->writeFieldBegin('traceCount', TType::I64, 2); - $xfer += $output->writeI64($this->traceCount); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/Zipkin/Annotation.php b/thrift/jaeger/Agent/Zipkin/Annotation.php deleted file mode 100644 index 178c8bbe1..000000000 --- a/thrift/jaeger/Agent/Zipkin/Annotation.php +++ /dev/null @@ -1,159 +0,0 @@ - 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)) { - if (isset($vals['timestamp'])) { - $this->timestamp = $vals['timestamp']; - } - if (isset($vals['value'])) { - $this->value = $vals['value']; - } - if (isset($vals['host'])) { - $this->host = $vals['host']; - } - } - } - - public function getName() - { - return 'Annotation'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->timestamp); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->value); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->host = new \Jaeger\Thrift\Agent\Zipkin\Endpoint(); - $xfer += $this->host->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('Annotation'); - if ($this->timestamp !== null) { - $xfer += $output->writeFieldBegin('timestamp', TType::I64, 1); - $xfer += $output->writeI64($this->timestamp); - $xfer += $output->writeFieldEnd(); - } - if ($this->value !== null) { - $xfer += $output->writeFieldBegin('value', TType::STRING, 2); - $xfer += $output->writeString($this->value); - $xfer += $output->writeFieldEnd(); - } - if ($this->host !== null) { - if (!is_object($this->host)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('host', TType::STRUCT, 3); - $xfer += $this->host->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/Zipkin/AnnotationType.php b/thrift/jaeger/Agent/Zipkin/AnnotationType.php deleted file mode 100644 index 39c5a16c4..000000000 --- a/thrift/jaeger/Agent/Zipkin/AnnotationType.php +++ /dev/null @@ -1,45 +0,0 @@ - 'BOOL', - 1 => 'BYTES', - 2 => 'I16', - 3 => 'I32', - 4 => 'I64', - 5 => 'DOUBLE', - 6 => 'STRING', - ); -} - diff --git a/thrift/jaeger/Agent/Zipkin/BinaryAnnotation.php b/thrift/jaeger/Agent/Zipkin/BinaryAnnotation.php deleted file mode 100644 index 39884d799..000000000 --- a/thrift/jaeger/Agent/Zipkin/BinaryAnnotation.php +++ /dev/null @@ -1,193 +0,0 @@ - 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)) { - if (isset($vals['key'])) { - $this->key = $vals['key']; - } - if (isset($vals['value'])) { - $this->value = $vals['value']; - } - if (isset($vals['annotation_type'])) { - $this->annotation_type = $vals['annotation_type']; - } - if (isset($vals['host'])) { - $this->host = $vals['host']; - } - } - } - - public function getName() - { - return 'BinaryAnnotation'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->key); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->value); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->annotation_type); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRUCT) { - $this->host = new \Jaeger\Thrift\Agent\Zipkin\Endpoint(); - $xfer += $this->host->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('BinaryAnnotation'); - if ($this->key !== null) { - $xfer += $output->writeFieldBegin('key', TType::STRING, 1); - $xfer += $output->writeString($this->key); - $xfer += $output->writeFieldEnd(); - } - if ($this->value !== null) { - $xfer += $output->writeFieldBegin('value', TType::STRING, 2); - $xfer += $output->writeString($this->value); - $xfer += $output->writeFieldEnd(); - } - if ($this->annotation_type !== null) { - $xfer += $output->writeFieldBegin('annotation_type', TType::I32, 3); - $xfer += $output->writeI32($this->annotation_type); - $xfer += $output->writeFieldEnd(); - } - if ($this->host !== null) { - if (!is_object($this->host)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('host', TType::STRUCT, 4); - $xfer += $this->host->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/Zipkin/Constant.php b/thrift/jaeger/Agent/Zipkin/Constant.php deleted file mode 100644 index ade2f6208..000000000 --- a/thrift/jaeger/Agent/Zipkin/Constant.php +++ /dev/null @@ -1,261 +0,0 @@ - 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)) { - if (isset($vals['ipv4'])) { - $this->ipv4 = $vals['ipv4']; - } - if (isset($vals['port'])) { - $this->port = $vals['port']; - } - if (isset($vals['service_name'])) { - $this->service_name = $vals['service_name']; - } - if (isset($vals['ipv6'])) { - $this->ipv6 = $vals['ipv6']; - } - } - } - - public function getName() - { - return 'Endpoint'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->ipv4); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->port); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->service_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->ipv6); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('Endpoint'); - if ($this->ipv4 !== null) { - $xfer += $output->writeFieldBegin('ipv4', TType::I32, 1); - $xfer += $output->writeI32($this->ipv4); - $xfer += $output->writeFieldEnd(); - } - if ($this->port !== null) { - $xfer += $output->writeFieldBegin('port', TType::I16, 2); - $xfer += $output->writeI16($this->port); - $xfer += $output->writeFieldEnd(); - } - if ($this->service_name !== null) { - $xfer += $output->writeFieldBegin('service_name', TType::STRING, 3); - $xfer += $output->writeString($this->service_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->ipv6 !== null) { - $xfer += $output->writeFieldBegin('ipv6', TType::STRING, 4); - $xfer += $output->writeString($this->ipv6); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/Zipkin/Response.php b/thrift/jaeger/Agent/Zipkin/Response.php deleted file mode 100644 index 22ae6f383..000000000 --- a/thrift/jaeger/Agent/Zipkin/Response.php +++ /dev/null @@ -1,94 +0,0 @@ - array( - 'var' => 'ok', - 'isRequired' => true, - 'type' => TType::BOOL, - ), - ); - - /** - * @var bool - */ - public $ok = null; - - public function __construct($vals = null) - { - if (is_array($vals)) { - if (isset($vals['ok'])) { - $this->ok = $vals['ok']; - } - } - } - - public function getName() - { - return 'Response'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->ok); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('Response'); - if ($this->ok !== null) { - $xfer += $output->writeFieldBegin('ok', TType::BOOL, 1); - $xfer += $output->writeBool($this->ok); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/Zipkin/Span.php b/thrift/jaeger/Agent/Zipkin/Span.php deleted file mode 100644 index 5f90335e4..000000000 --- a/thrift/jaeger/Agent/Zipkin/Span.php +++ /dev/null @@ -1,397 +0,0 @@ - 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 compatibility 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 compatibility 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)) { - if (isset($vals['trace_id'])) { - $this->trace_id = $vals['trace_id']; - } - if (isset($vals['name'])) { - $this->name = $vals['name']; - } - if (isset($vals['id'])) { - $this->id = $vals['id']; - } - if (isset($vals['parent_id'])) { - $this->parent_id = $vals['parent_id']; - } - if (isset($vals['annotations'])) { - $this->annotations = $vals['annotations']; - } - if (isset($vals['binary_annotations'])) { - $this->binary_annotations = $vals['binary_annotations']; - } - if (isset($vals['debug'])) { - $this->debug = $vals['debug']; - } - if (isset($vals['timestamp'])) { - $this->timestamp = $vals['timestamp']; - } - if (isset($vals['duration'])) { - $this->duration = $vals['duration']; - } - if (isset($vals['trace_id_high'])) { - $this->trace_id_high = $vals['trace_id_high']; - } - } - } - - public function getName() - { - return 'Span'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->trace_id); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->id); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->parent_id); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::LST) { - $this->annotations = array(); - $_size0 = 0; - $_etype3 = 0; - $xfer += $input->readListBegin($_etype3, $_size0); - for ($_i4 = 0; $_i4 < $_size0; ++$_i4) { - $elem5 = null; - $elem5 = new \Jaeger\Thrift\Agent\Zipkin\Annotation(); - $xfer += $elem5->read($input); - $this->annotations []= $elem5; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 8: - if ($ftype == TType::LST) { - $this->binary_annotations = array(); - $_size6 = 0; - $_etype9 = 0; - $xfer += $input->readListBegin($_etype9, $_size6); - for ($_i10 = 0; $_i10 < $_size6; ++$_i10) { - $elem11 = null; - $elem11 = new \Jaeger\Thrift\Agent\Zipkin\BinaryAnnotation(); - $xfer += $elem11->read($input); - $this->binary_annotations []= $elem11; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 9: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->debug); - } else { - $xfer += $input->skip($ftype); - } - break; - case 10: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->timestamp); - } else { - $xfer += $input->skip($ftype); - } - break; - case 11: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->duration); - } else { - $xfer += $input->skip($ftype); - } - break; - case 12: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->trace_id_high); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('Span'); - if ($this->trace_id !== null) { - $xfer += $output->writeFieldBegin('trace_id', TType::I64, 1); - $xfer += $output->writeI64($this->trace_id); - $xfer += $output->writeFieldEnd(); - } - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 3); - $xfer += $output->writeString($this->name); - $xfer += $output->writeFieldEnd(); - } - if ($this->id !== null) { - $xfer += $output->writeFieldBegin('id', TType::I64, 4); - $xfer += $output->writeI64($this->id); - $xfer += $output->writeFieldEnd(); - } - if ($this->parent_id !== null) { - $xfer += $output->writeFieldBegin('parent_id', TType::I64, 5); - $xfer += $output->writeI64($this->parent_id); - $xfer += $output->writeFieldEnd(); - } - if ($this->annotations !== null) { - if (!is_array($this->annotations)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('annotations', TType::LST, 6); - $output->writeListBegin(TType::STRUCT, count($this->annotations)); - foreach ($this->annotations as $iter12) { - $xfer += $iter12->write($output); - } - $output->writeListEnd(); - $xfer += $output->writeFieldEnd(); - } - if ($this->binary_annotations !== null) { - if (!is_array($this->binary_annotations)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('binary_annotations', TType::LST, 8); - $output->writeListBegin(TType::STRUCT, count($this->binary_annotations)); - foreach ($this->binary_annotations as $iter13) { - $xfer += $iter13->write($output); - } - $output->writeListEnd(); - $xfer += $output->writeFieldEnd(); - } - if ($this->debug !== null) { - $xfer += $output->writeFieldBegin('debug', TType::BOOL, 9); - $xfer += $output->writeBool($this->debug); - $xfer += $output->writeFieldEnd(); - } - if ($this->timestamp !== null) { - $xfer += $output->writeFieldBegin('timestamp', TType::I64, 10); - $xfer += $output->writeI64($this->timestamp); - $xfer += $output->writeFieldEnd(); - } - if ($this->duration !== null) { - $xfer += $output->writeFieldBegin('duration', TType::I64, 11); - $xfer += $output->writeI64($this->duration); - $xfer += $output->writeFieldEnd(); - } - if ($this->trace_id_high !== null) { - $xfer += $output->writeFieldBegin('trace_id_high', TType::I64, 12); - $xfer += $output->writeI64($this->trace_id_high); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/Zipkin/ZipkinCollectorClient.php b/thrift/jaeger/Agent/Zipkin/ZipkinCollectorClient.php deleted file mode 100644 index ee0bea1f6..000000000 --- a/thrift/jaeger/Agent/Zipkin/ZipkinCollectorClient.php +++ /dev/null @@ -1,91 +0,0 @@ -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/thrift/jaeger/Agent/Zipkin/ZipkinCollectorIf.php b/thrift/jaeger/Agent/Zipkin/ZipkinCollectorIf.php deleted file mode 100644 index ad0749684..000000000 --- a/thrift/jaeger/Agent/Zipkin/ZipkinCollectorIf.php +++ /dev/null @@ -1,26 +0,0 @@ - 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)) { - if (isset($vals['spans'])) { - $this->spans = $vals['spans']; - } - } - } - - public function getName() - { - return 'ZipkinCollector_submitZipkinBatch_args'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::LST) { - $this->spans = array(); - $_size14 = 0; - $_etype17 = 0; - $xfer += $input->readListBegin($_etype17, $_size14); - for ($_i18 = 0; $_i18 < $_size14; ++$_i18) { - $elem19 = null; - $elem19 = new \Jaeger\Thrift\Agent\Zipkin\Span(); - $xfer += $elem19->read($input); - $this->spans []= $elem19; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('ZipkinCollector_submitZipkinBatch_args'); - if ($this->spans !== null) { - if (!is_array($this->spans)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('spans', TType::LST, 1); - $output->writeListBegin(TType::STRUCT, count($this->spans)); - foreach ($this->spans as $iter20) { - $xfer += $iter20->write($output); - } - $output->writeListEnd(); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Agent/Zipkin/ZipkinCollector_submitZipkinBatch_result.php b/thrift/jaeger/Agent/Zipkin/ZipkinCollector_submitZipkinBatch_result.php deleted file mode 100644 index c04a8a18e..000000000 --- a/thrift/jaeger/Agent/Zipkin/ZipkinCollector_submitZipkinBatch_result.php +++ /dev/null @@ -1,116 +0,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)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() - { - return 'ZipkinCollector_submitZipkinBatch_result'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size21 = 0; - $_etype24 = 0; - $xfer += $input->readListBegin($_etype24, $_size21); - for ($_i25 = 0; $_i25 < $_size21; ++$_i25) { - $elem26 = null; - $elem26 = new \Jaeger\Thrift\Agent\Zipkin\Response(); - $xfer += $elem26->read($input); - $this->success []= $elem26; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('ZipkinCollector_submitZipkinBatch_result'); - if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - $output->writeListBegin(TType::STRUCT, count($this->success)); - foreach ($this->success as $iter27) { - $xfer += $iter27->write($output); - } - $output->writeListEnd(); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Batch.php b/thrift/jaeger/Batch.php deleted file mode 100644 index 311c65636..000000000 --- a/thrift/jaeger/Batch.php +++ /dev/null @@ -1,198 +0,0 @@ - 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', - ), - ), - 3 => array( - 'var' => 'seqNo', - 'isRequired' => false, - 'type' => TType::I64, - ), - 4 => array( - 'var' => 'stats', - 'isRequired' => false, - 'type' => TType::STRUCT, - 'class' => '\Jaeger\Thrift\ClientStats', - ), - ); - - /** - * @var \Jaeger\Thrift\Process - */ - public $process = null; - /** - * @var \Jaeger\Thrift\Span[] - */ - public $spans = null; - /** - * @var int - */ - public $seqNo = null; - /** - * @var \Jaeger\Thrift\ClientStats - */ - public $stats = null; - - public function __construct($vals = null) - { - if (is_array($vals)) { - if (isset($vals['process'])) { - $this->process = $vals['process']; - } - if (isset($vals['spans'])) { - $this->spans = $vals['spans']; - } - if (isset($vals['seqNo'])) { - $this->seqNo = $vals['seqNo']; - } - if (isset($vals['stats'])) { - $this->stats = $vals['stats']; - } - } - } - - public function getName() - { - return 'Batch'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::STRUCT) { - $this->process = new \Jaeger\Thrift\Process(); - $xfer += $this->process->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::LST) { - $this->spans = array(); - $_size35 = 0; - $_etype38 = 0; - $xfer += $input->readListBegin($_etype38, $_size35); - for ($_i39 = 0; $_i39 < $_size35; ++$_i39) { - $elem40 = null; - $elem40 = new \Jaeger\Thrift\Span(); - $xfer += $elem40->read($input); - $this->spans []= $elem40; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->seqNo); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRUCT) { - $this->stats = new \Jaeger\Thrift\ClientStats(); - $xfer += $this->stats->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('Batch'); - if ($this->process !== null) { - if (!is_object($this->process)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('process', TType::STRUCT, 1); - $xfer += $this->process->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->spans !== null) { - if (!is_array($this->spans)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('spans', TType::LST, 2); - $output->writeListBegin(TType::STRUCT, count($this->spans)); - foreach ($this->spans as $iter41) { - $xfer += $iter41->write($output); - } - $output->writeListEnd(); - $xfer += $output->writeFieldEnd(); - } - if ($this->seqNo !== null) { - $xfer += $output->writeFieldBegin('seqNo', TType::I64, 3); - $xfer += $output->writeI64($this->seqNo); - $xfer += $output->writeFieldEnd(); - } - if ($this->stats !== null) { - if (!is_object($this->stats)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('stats', TType::STRUCT, 4); - $xfer += $this->stats->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/BatchSubmitResponse.php b/thrift/jaeger/BatchSubmitResponse.php deleted file mode 100644 index 492e29335..000000000 --- a/thrift/jaeger/BatchSubmitResponse.php +++ /dev/null @@ -1,94 +0,0 @@ - array( - 'var' => 'ok', - 'isRequired' => true, - 'type' => TType::BOOL, - ), - ); - - /** - * @var bool - */ - public $ok = null; - - public function __construct($vals = null) - { - if (is_array($vals)) { - if (isset($vals['ok'])) { - $this->ok = $vals['ok']; - } - } - } - - public function getName() - { - return 'BatchSubmitResponse'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->ok); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('BatchSubmitResponse'); - if ($this->ok !== null) { - $xfer += $output->writeFieldBegin('ok', TType::BOOL, 1); - $xfer += $output->writeBool($this->ok); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/ClientStats.php b/thrift/jaeger/ClientStats.php deleted file mode 100644 index e554c2091..000000000 --- a/thrift/jaeger/ClientStats.php +++ /dev/null @@ -1,142 +0,0 @@ - array( - 'var' => 'fullQueueDroppedSpans', - 'isRequired' => true, - 'type' => TType::I64, - ), - 2 => array( - 'var' => 'tooLargeDroppedSpans', - 'isRequired' => true, - 'type' => TType::I64, - ), - 3 => array( - 'var' => 'failedToEmitSpans', - 'isRequired' => true, - 'type' => TType::I64, - ), - ); - - /** - * @var int - */ - public $fullQueueDroppedSpans = null; - /** - * @var int - */ - public $tooLargeDroppedSpans = null; - /** - * @var int - */ - public $failedToEmitSpans = null; - - public function __construct($vals = null) - { - if (is_array($vals)) { - if (isset($vals['fullQueueDroppedSpans'])) { - $this->fullQueueDroppedSpans = $vals['fullQueueDroppedSpans']; - } - if (isset($vals['tooLargeDroppedSpans'])) { - $this->tooLargeDroppedSpans = $vals['tooLargeDroppedSpans']; - } - if (isset($vals['failedToEmitSpans'])) { - $this->failedToEmitSpans = $vals['failedToEmitSpans']; - } - } - } - - public function getName() - { - return 'ClientStats'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->fullQueueDroppedSpans); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->tooLargeDroppedSpans); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->failedToEmitSpans); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('ClientStats'); - if ($this->fullQueueDroppedSpans !== null) { - $xfer += $output->writeFieldBegin('fullQueueDroppedSpans', TType::I64, 1); - $xfer += $output->writeI64($this->fullQueueDroppedSpans); - $xfer += $output->writeFieldEnd(); - } - if ($this->tooLargeDroppedSpans !== null) { - $xfer += $output->writeFieldBegin('tooLargeDroppedSpans', TType::I64, 2); - $xfer += $output->writeI64($this->tooLargeDroppedSpans); - $xfer += $output->writeFieldEnd(); - } - if ($this->failedToEmitSpans !== null) { - $xfer += $output->writeFieldBegin('failedToEmitSpans', TType::I64, 3); - $xfer += $output->writeI64($this->failedToEmitSpans); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/CollectorClient.php b/thrift/jaeger/CollectorClient.php deleted file mode 100644 index b8d385cf7..000000000 --- a/thrift/jaeger/CollectorClient.php +++ /dev/null @@ -1,91 +0,0 @@ -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/thrift/jaeger/CollectorIf.php b/thrift/jaeger/CollectorIf.php deleted file mode 100644 index 66d35f246..000000000 --- a/thrift/jaeger/CollectorIf.php +++ /dev/null @@ -1,26 +0,0 @@ - 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)) { - if (isset($vals['batches'])) { - $this->batches = $vals['batches']; - } - } - } - - public function getName() - { - return 'Collector_submitBatches_args'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::LST) { - $this->batches = array(); - $_size42 = 0; - $_etype45 = 0; - $xfer += $input->readListBegin($_etype45, $_size42); - for ($_i46 = 0; $_i46 < $_size42; ++$_i46) { - $elem47 = null; - $elem47 = new \Jaeger\Thrift\Batch(); - $xfer += $elem47->read($input); - $this->batches []= $elem47; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('Collector_submitBatches_args'); - if ($this->batches !== null) { - if (!is_array($this->batches)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('batches', TType::LST, 1); - $output->writeListBegin(TType::STRUCT, count($this->batches)); - foreach ($this->batches as $iter48) { - $xfer += $iter48->write($output); - } - $output->writeListEnd(); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Collector_submitBatches_result.php b/thrift/jaeger/Collector_submitBatches_result.php deleted file mode 100644 index 1b179b735..000000000 --- a/thrift/jaeger/Collector_submitBatches_result.php +++ /dev/null @@ -1,116 +0,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)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() - { - return 'Collector_submitBatches_result'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size49 = 0; - $_etype52 = 0; - $xfer += $input->readListBegin($_etype52, $_size49); - for ($_i53 = 0; $_i53 < $_size49; ++$_i53) { - $elem54 = null; - $elem54 = new \Jaeger\Thrift\BatchSubmitResponse(); - $xfer += $elem54->read($input); - $this->success []= $elem54; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('Collector_submitBatches_result'); - if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - $output->writeListBegin(TType::STRUCT, count($this->success)); - foreach ($this->success as $iter55) { - $xfer += $iter55->write($output); - } - $output->writeListEnd(); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Crossdock/Downstream.php b/thrift/jaeger/Crossdock/Downstream.php deleted file mode 100644 index d8d03f52c..000000000 --- a/thrift/jaeger/Crossdock/Downstream.php +++ /dev/null @@ -1,219 +0,0 @@ - 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)) { - if (isset($vals['serviceName'])) { - $this->serviceName = $vals['serviceName']; - } - if (isset($vals['serverRole'])) { - $this->serverRole = $vals['serverRole']; - } - if (isset($vals['host'])) { - $this->host = $vals['host']; - } - if (isset($vals['port'])) { - $this->port = $vals['port']; - } - if (isset($vals['transport'])) { - $this->transport = $vals['transport']; - } - if (isset($vals['downstream'])) { - $this->downstream = $vals['downstream']; - } - } - } - - public function getName() - { - return 'Downstream'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->serviceName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->serverRole); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->host); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->port); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->transport); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::STRUCT) { - $this->downstream = new \Jaeger\Thrift\Crossdock\Downstream(); - $xfer += $this->downstream->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('Downstream'); - if ($this->serviceName !== null) { - $xfer += $output->writeFieldBegin('serviceName', TType::STRING, 1); - $xfer += $output->writeString($this->serviceName); - $xfer += $output->writeFieldEnd(); - } - if ($this->serverRole !== null) { - $xfer += $output->writeFieldBegin('serverRole', TType::STRING, 2); - $xfer += $output->writeString($this->serverRole); - $xfer += $output->writeFieldEnd(); - } - if ($this->host !== null) { - $xfer += $output->writeFieldBegin('host', TType::STRING, 3); - $xfer += $output->writeString($this->host); - $xfer += $output->writeFieldEnd(); - } - if ($this->port !== null) { - $xfer += $output->writeFieldBegin('port', TType::STRING, 4); - $xfer += $output->writeString($this->port); - $xfer += $output->writeFieldEnd(); - } - if ($this->transport !== null) { - $xfer += $output->writeFieldBegin('transport', TType::I32, 5); - $xfer += $output->writeI32($this->transport); - $xfer += $output->writeFieldEnd(); - } - if ($this->downstream !== null) { - if (!is_object($this->downstream)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('downstream', TType::STRUCT, 6); - $xfer += $this->downstream->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Crossdock/JoinTraceRequest.php b/thrift/jaeger/Crossdock/JoinTraceRequest.php deleted file mode 100644 index c80fec8ee..000000000 --- a/thrift/jaeger/Crossdock/JoinTraceRequest.php +++ /dev/null @@ -1,123 +0,0 @@ - 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)) { - if (isset($vals['serverRole'])) { - $this->serverRole = $vals['serverRole']; - } - if (isset($vals['downstream'])) { - $this->downstream = $vals['downstream']; - } - } - } - - public function getName() - { - return 'JoinTraceRequest'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->serverRole); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->downstream = new \Jaeger\Thrift\Crossdock\Downstream(); - $xfer += $this->downstream->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('JoinTraceRequest'); - if ($this->serverRole !== null) { - $xfer += $output->writeFieldBegin('serverRole', TType::STRING, 1); - $xfer += $output->writeString($this->serverRole); - $xfer += $output->writeFieldEnd(); - } - if ($this->downstream !== null) { - if (!is_object($this->downstream)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('downstream', TType::STRUCT, 2); - $xfer += $this->downstream->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Crossdock/ObservedSpan.php b/thrift/jaeger/Crossdock/ObservedSpan.php deleted file mode 100644 index 20fcfd2b8..000000000 --- a/thrift/jaeger/Crossdock/ObservedSpan.php +++ /dev/null @@ -1,142 +0,0 @@ - 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)) { - if (isset($vals['traceId'])) { - $this->traceId = $vals['traceId']; - } - if (isset($vals['sampled'])) { - $this->sampled = $vals['sampled']; - } - if (isset($vals['baggage'])) { - $this->baggage = $vals['baggage']; - } - } - } - - public function getName() - { - return 'ObservedSpan'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->traceId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->sampled); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->baggage); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('ObservedSpan'); - if ($this->traceId !== null) { - $xfer += $output->writeFieldBegin('traceId', TType::STRING, 1); - $xfer += $output->writeString($this->traceId); - $xfer += $output->writeFieldEnd(); - } - if ($this->sampled !== null) { - $xfer += $output->writeFieldBegin('sampled', TType::BOOL, 2); - $xfer += $output->writeBool($this->sampled); - $xfer += $output->writeFieldEnd(); - } - if ($this->baggage !== null) { - $xfer += $output->writeFieldBegin('baggage', TType::STRING, 3); - $xfer += $output->writeString($this->baggage); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Crossdock/StartTraceRequest.php b/thrift/jaeger/Crossdock/StartTraceRequest.php deleted file mode 100644 index 21701714d..000000000 --- a/thrift/jaeger/Crossdock/StartTraceRequest.php +++ /dev/null @@ -1,171 +0,0 @@ - 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)) { - if (isset($vals['serverRole'])) { - $this->serverRole = $vals['serverRole']; - } - if (isset($vals['sampled'])) { - $this->sampled = $vals['sampled']; - } - if (isset($vals['baggage'])) { - $this->baggage = $vals['baggage']; - } - if (isset($vals['downstream'])) { - $this->downstream = $vals['downstream']; - } - } - } - - public function getName() - { - return 'StartTraceRequest'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->serverRole); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->sampled); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->baggage); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRUCT) { - $this->downstream = new \Jaeger\Thrift\Crossdock\Downstream(); - $xfer += $this->downstream->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('StartTraceRequest'); - if ($this->serverRole !== null) { - $xfer += $output->writeFieldBegin('serverRole', TType::STRING, 1); - $xfer += $output->writeString($this->serverRole); - $xfer += $output->writeFieldEnd(); - } - if ($this->sampled !== null) { - $xfer += $output->writeFieldBegin('sampled', TType::BOOL, 2); - $xfer += $output->writeBool($this->sampled); - $xfer += $output->writeFieldEnd(); - } - if ($this->baggage !== null) { - $xfer += $output->writeFieldBegin('baggage', TType::STRING, 3); - $xfer += $output->writeString($this->baggage); - $xfer += $output->writeFieldEnd(); - } - if ($this->downstream !== null) { - if (!is_object($this->downstream)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('downstream', TType::STRUCT, 4); - $xfer += $this->downstream->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Crossdock/TraceResponse.php b/thrift/jaeger/Crossdock/TraceResponse.php deleted file mode 100644 index 898ddd65e..000000000 --- a/thrift/jaeger/Crossdock/TraceResponse.php +++ /dev/null @@ -1,158 +0,0 @@ - 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)) { - if (isset($vals['span'])) { - $this->span = $vals['span']; - } - if (isset($vals['downstream'])) { - $this->downstream = $vals['downstream']; - } - if (isset($vals['notImplementedError'])) { - $this->notImplementedError = $vals['notImplementedError']; - } - } - } - - public function getName() - { - return 'TraceResponse'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::STRUCT) { - $this->span = new \Jaeger\Thrift\Crossdock\ObservedSpan(); - $xfer += $this->span->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->downstream = new \Jaeger\Thrift\Crossdock\TraceResponse(); - $xfer += $this->downstream->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->notImplementedError); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('TraceResponse'); - if ($this->span !== null) { - if (!is_object($this->span)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('span', TType::STRUCT, 1); - $xfer += $this->span->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->downstream !== null) { - if (!is_object($this->downstream)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('downstream', TType::STRUCT, 2); - $xfer += $this->downstream->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->notImplementedError !== null) { - $xfer += $output->writeFieldBegin('notImplementedError', TType::STRING, 3); - $xfer += $output->writeString($this->notImplementedError); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Crossdock/TracedServiceClient.php b/thrift/jaeger/Crossdock/TracedServiceClient.php deleted file mode 100644 index e44c66d1e..000000000 --- a/thrift/jaeger/Crossdock/TracedServiceClient.php +++ /dev/null @@ -1,150 +0,0 @@ -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/thrift/jaeger/Crossdock/TracedServiceIf.php b/thrift/jaeger/Crossdock/TracedServiceIf.php deleted file mode 100644 index 35b942b83..000000000 --- a/thrift/jaeger/Crossdock/TracedServiceIf.php +++ /dev/null @@ -1,39 +0,0 @@ - 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)) { - if (isset($vals['request'])) { - $this->request = $vals['request']; - } - } - } - - public function getName() - { - return 'TracedService_joinTrace_args'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::STRUCT) { - $this->request = new \Jaeger\Thrift\Crossdock\JoinTraceRequest(); - $xfer += $this->request->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('TracedService_joinTrace_args'); - if ($this->request !== null) { - if (!is_object($this->request)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); - $xfer += $this->request->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Crossdock/TracedService_joinTrace_result.php b/thrift/jaeger/Crossdock/TracedService_joinTrace_result.php deleted file mode 100644 index 1adb3c963..000000000 --- a/thrift/jaeger/Crossdock/TracedService_joinTrace_result.php +++ /dev/null @@ -1,99 +0,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)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() - { - return 'TracedService_joinTrace_result'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 0: - if ($ftype == TType::STRUCT) { - $this->success = new \Jaeger\Thrift\Crossdock\TraceResponse(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('TracedService_joinTrace_result'); - if ($this->success !== null) { - if (!is_object($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Crossdock/TracedService_startTrace_args.php b/thrift/jaeger/Crossdock/TracedService_startTrace_args.php deleted file mode 100644 index 2c812a039..000000000 --- a/thrift/jaeger/Crossdock/TracedService_startTrace_args.php +++ /dev/null @@ -1,99 +0,0 @@ - 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)) { - if (isset($vals['request'])) { - $this->request = $vals['request']; - } - } - } - - public function getName() - { - return 'TracedService_startTrace_args'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::STRUCT) { - $this->request = new \Jaeger\Thrift\Crossdock\StartTraceRequest(); - $xfer += $this->request->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('TracedService_startTrace_args'); - if ($this->request !== null) { - if (!is_object($this->request)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('request', TType::STRUCT, 1); - $xfer += $this->request->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Crossdock/TracedService_startTrace_result.php b/thrift/jaeger/Crossdock/TracedService_startTrace_result.php deleted file mode 100644 index 3e8d3076e..000000000 --- a/thrift/jaeger/Crossdock/TracedService_startTrace_result.php +++ /dev/null @@ -1,99 +0,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)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() - { - return 'TracedService_startTrace_result'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 0: - if ($ftype == TType::STRUCT) { - $this->success = new \Jaeger\Thrift\Crossdock\TraceResponse(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('TracedService_startTrace_result'); - if ($this->success !== null) { - if (!is_object($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Crossdock/Transport.php b/thrift/jaeger/Crossdock/Transport.php deleted file mode 100644 index 5cb5ba5da..000000000 --- a/thrift/jaeger/Crossdock/Transport.php +++ /dev/null @@ -1,33 +0,0 @@ - 'HTTP', - 1 => 'TCHANNEL', - 2 => 'DUMMY', - ); -} - diff --git a/thrift/jaeger/Log.php b/thrift/jaeger/Log.php deleted file mode 100644 index 416bbb7d4..000000000 --- a/thrift/jaeger/Log.php +++ /dev/null @@ -1,140 +0,0 @@ - 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)) { - if (isset($vals['timestamp'])) { - $this->timestamp = $vals['timestamp']; - } - if (isset($vals['fields'])) { - $this->fields = $vals['fields']; - } - } - } - - public function getName() - { - return 'Log'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->timestamp); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::LST) { - $this->fields = array(); - $_size0 = 0; - $_etype3 = 0; - $xfer += $input->readListBegin($_etype3, $_size0); - for ($_i4 = 0; $_i4 < $_size0; ++$_i4) { - $elem5 = null; - $elem5 = new \Jaeger\Thrift\Tag(); - $xfer += $elem5->read($input); - $this->fields []= $elem5; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('Log'); - if ($this->timestamp !== null) { - $xfer += $output->writeFieldBegin('timestamp', TType::I64, 1); - $xfer += $output->writeI64($this->timestamp); - $xfer += $output->writeFieldEnd(); - } - if ($this->fields !== null) { - if (!is_array($this->fields)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('fields', TType::LST, 2); - $output->writeListBegin(TType::STRUCT, count($this->fields)); - foreach ($this->fields as $iter6) { - $xfer += $iter6->write($output); - } - $output->writeListEnd(); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/Process.php b/thrift/jaeger/Process.php deleted file mode 100644 index 8c6befbd8..000000000 --- a/thrift/jaeger/Process.php +++ /dev/null @@ -1,140 +0,0 @@ - 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)) { - if (isset($vals['serviceName'])) { - $this->serviceName = $vals['serviceName']; - } - if (isset($vals['tags'])) { - $this->tags = $vals['tags']; - } - } - } - - public function getName() - { - return 'Process'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->serviceName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::LST) { - $this->tags = array(); - $_size28 = 0; - $_etype31 = 0; - $xfer += $input->readListBegin($_etype31, $_size28); - for ($_i32 = 0; $_i32 < $_size28; ++$_i32) { - $elem33 = null; - $elem33 = new \Jaeger\Thrift\Tag(); - $xfer += $elem33->read($input); - $this->tags []= $elem33; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('Process'); - if ($this->serviceName !== null) { - $xfer += $output->writeFieldBegin('serviceName', TType::STRING, 1); - $xfer += $output->writeString($this->serviceName); - $xfer += $output->writeFieldEnd(); - } - if ($this->tags !== null) { - if (!is_array($this->tags)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('tags', TType::LST, 2); - $output->writeListBegin(TType::STRUCT, count($this->tags)); - foreach ($this->tags as $iter34) { - $xfer += $iter34->write($output); - } - $output->writeListEnd(); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/README.md b/thrift/jaeger/README.md deleted file mode 100644 index 1154f6a24..000000000 --- a/thrift/jaeger/README.md +++ /dev/null @@ -1 +0,0 @@ -# OpenTelemetry Jaeger Thrift files \ No newline at end of file diff --git a/thrift/jaeger/Span.php b/thrift/jaeger/Span.php deleted file mode 100644 index f04e9528c..000000000 --- a/thrift/jaeger/Span.php +++ /dev/null @@ -1,400 +0,0 @@ - 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)) { - if (isset($vals['traceIdLow'])) { - $this->traceIdLow = $vals['traceIdLow']; - } - if (isset($vals['traceIdHigh'])) { - $this->traceIdHigh = $vals['traceIdHigh']; - } - if (isset($vals['spanId'])) { - $this->spanId = $vals['spanId']; - } - if (isset($vals['parentSpanId'])) { - $this->parentSpanId = $vals['parentSpanId']; - } - if (isset($vals['operationName'])) { - $this->operationName = $vals['operationName']; - } - if (isset($vals['references'])) { - $this->references = $vals['references']; - } - if (isset($vals['flags'])) { - $this->flags = $vals['flags']; - } - if (isset($vals['startTime'])) { - $this->startTime = $vals['startTime']; - } - if (isset($vals['duration'])) { - $this->duration = $vals['duration']; - } - if (isset($vals['tags'])) { - $this->tags = $vals['tags']; - } - if (isset($vals['logs'])) { - $this->logs = $vals['logs']; - } - } - } - - public function getName() - { - return 'Span'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->traceIdLow); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->traceIdHigh); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->spanId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->parentSpanId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->operationName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::LST) { - $this->references = array(); - $_size7 = 0; - $_etype10 = 0; - $xfer += $input->readListBegin($_etype10, $_size7); - for ($_i11 = 0; $_i11 < $_size7; ++$_i11) { - $elem12 = null; - $elem12 = new \Jaeger\Thrift\SpanRef(); - $xfer += $elem12->read($input); - $this->references []= $elem12; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->flags); - } else { - $xfer += $input->skip($ftype); - } - break; - case 8: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->startTime); - } else { - $xfer += $input->skip($ftype); - } - break; - case 9: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->duration); - } else { - $xfer += $input->skip($ftype); - } - break; - case 10: - if ($ftype == TType::LST) { - $this->tags = array(); - $_size13 = 0; - $_etype16 = 0; - $xfer += $input->readListBegin($_etype16, $_size13); - for ($_i17 = 0; $_i17 < $_size13; ++$_i17) { - $elem18 = null; - $elem18 = new \Jaeger\Thrift\Tag(); - $xfer += $elem18->read($input); - $this->tags []= $elem18; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 11: - if ($ftype == TType::LST) { - $this->logs = array(); - $_size19 = 0; - $_etype22 = 0; - $xfer += $input->readListBegin($_etype22, $_size19); - for ($_i23 = 0; $_i23 < $_size19; ++$_i23) { - $elem24 = null; - $elem24 = new \Jaeger\Thrift\Log(); - $xfer += $elem24->read($input); - $this->logs []= $elem24; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('Span'); - if ($this->traceIdLow !== null) { - $xfer += $output->writeFieldBegin('traceIdLow', TType::I64, 1); - $xfer += $output->writeI64($this->traceIdLow); - $xfer += $output->writeFieldEnd(); - } - if ($this->traceIdHigh !== null) { - $xfer += $output->writeFieldBegin('traceIdHigh', TType::I64, 2); - $xfer += $output->writeI64($this->traceIdHigh); - $xfer += $output->writeFieldEnd(); - } - if ($this->spanId !== null) { - $xfer += $output->writeFieldBegin('spanId', TType::I64, 3); - $xfer += $output->writeI64($this->spanId); - $xfer += $output->writeFieldEnd(); - } - if ($this->parentSpanId !== null) { - $xfer += $output->writeFieldBegin('parentSpanId', TType::I64, 4); - $xfer += $output->writeI64($this->parentSpanId); - $xfer += $output->writeFieldEnd(); - } - if ($this->operationName !== null) { - $xfer += $output->writeFieldBegin('operationName', TType::STRING, 5); - $xfer += $output->writeString($this->operationName); - $xfer += $output->writeFieldEnd(); - } - if ($this->references !== null) { - if (!is_array($this->references)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('references', TType::LST, 6); - $output->writeListBegin(TType::STRUCT, count($this->references)); - foreach ($this->references as $iter25) { - $xfer += $iter25->write($output); - } - $output->writeListEnd(); - $xfer += $output->writeFieldEnd(); - } - if ($this->flags !== null) { - $xfer += $output->writeFieldBegin('flags', TType::I32, 7); - $xfer += $output->writeI32($this->flags); - $xfer += $output->writeFieldEnd(); - } - if ($this->startTime !== null) { - $xfer += $output->writeFieldBegin('startTime', TType::I64, 8); - $xfer += $output->writeI64($this->startTime); - $xfer += $output->writeFieldEnd(); - } - if ($this->duration !== null) { - $xfer += $output->writeFieldBegin('duration', TType::I64, 9); - $xfer += $output->writeI64($this->duration); - $xfer += $output->writeFieldEnd(); - } - if ($this->tags !== null) { - if (!is_array($this->tags)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('tags', TType::LST, 10); - $output->writeListBegin(TType::STRUCT, count($this->tags)); - foreach ($this->tags as $iter26) { - $xfer += $iter26->write($output); - } - $output->writeListEnd(); - $xfer += $output->writeFieldEnd(); - } - if ($this->logs !== null) { - if (!is_array($this->logs)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('logs', TType::LST, 11); - $output->writeListBegin(TType::STRUCT, count($this->logs)); - foreach ($this->logs as $iter27) { - $xfer += $iter27->write($output); - } - $output->writeListEnd(); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/SpanRef.php b/thrift/jaeger/SpanRef.php deleted file mode 100644 index 407bf4d97..000000000 --- a/thrift/jaeger/SpanRef.php +++ /dev/null @@ -1,166 +0,0 @@ - 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)) { - if (isset($vals['refType'])) { - $this->refType = $vals['refType']; - } - if (isset($vals['traceIdLow'])) { - $this->traceIdLow = $vals['traceIdLow']; - } - if (isset($vals['traceIdHigh'])) { - $this->traceIdHigh = $vals['traceIdHigh']; - } - if (isset($vals['spanId'])) { - $this->spanId = $vals['spanId']; - } - } - } - - public function getName() - { - return 'SpanRef'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->refType); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->traceIdLow); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->traceIdHigh); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->spanId); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('SpanRef'); - if ($this->refType !== null) { - $xfer += $output->writeFieldBegin('refType', TType::I32, 1); - $xfer += $output->writeI32($this->refType); - $xfer += $output->writeFieldEnd(); - } - if ($this->traceIdLow !== null) { - $xfer += $output->writeFieldBegin('traceIdLow', TType::I64, 2); - $xfer += $output->writeI64($this->traceIdLow); - $xfer += $output->writeFieldEnd(); - } - if ($this->traceIdHigh !== null) { - $xfer += $output->writeFieldBegin('traceIdHigh', TType::I64, 3); - $xfer += $output->writeI64($this->traceIdHigh); - $xfer += $output->writeFieldEnd(); - } - if ($this->spanId !== null) { - $xfer += $output->writeFieldBegin('spanId', TType::I64, 4); - $xfer += $output->writeI64($this->spanId); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/SpanRefType.php b/thrift/jaeger/SpanRefType.php deleted file mode 100644 index d657a92e3..000000000 --- a/thrift/jaeger/SpanRefType.php +++ /dev/null @@ -1,30 +0,0 @@ - 'CHILD_OF', - 1 => 'FOLLOWS_FROM', - ); -} - diff --git a/thrift/jaeger/Tag.php b/thrift/jaeger/Tag.php deleted file mode 100644 index 1a3c0039e..000000000 --- a/thrift/jaeger/Tag.php +++ /dev/null @@ -1,238 +0,0 @@ - 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)) { - if (isset($vals['key'])) { - $this->key = $vals['key']; - } - if (isset($vals['vType'])) { - $this->vType = $vals['vType']; - } - if (isset($vals['vStr'])) { - $this->vStr = $vals['vStr']; - } - if (isset($vals['vDouble'])) { - $this->vDouble = $vals['vDouble']; - } - if (isset($vals['vBool'])) { - $this->vBool = $vals['vBool']; - } - if (isset($vals['vLong'])) { - $this->vLong = $vals['vLong']; - } - if (isset($vals['vBinary'])) { - $this->vBinary = $vals['vBinary']; - } - } - } - - public function getName() - { - return 'Tag'; - } - - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->key); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->vType); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->vStr); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::DOUBLE) { - $xfer += $input->readDouble($this->vDouble); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->vBool); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->vLong); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->vBinary); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) - { - $xfer = 0; - $xfer += $output->writeStructBegin('Tag'); - if ($this->key !== null) { - $xfer += $output->writeFieldBegin('key', TType::STRING, 1); - $xfer += $output->writeString($this->key); - $xfer += $output->writeFieldEnd(); - } - if ($this->vType !== null) { - $xfer += $output->writeFieldBegin('vType', TType::I32, 2); - $xfer += $output->writeI32($this->vType); - $xfer += $output->writeFieldEnd(); - } - if ($this->vStr !== null) { - $xfer += $output->writeFieldBegin('vStr', TType::STRING, 3); - $xfer += $output->writeString($this->vStr); - $xfer += $output->writeFieldEnd(); - } - if ($this->vDouble !== null) { - $xfer += $output->writeFieldBegin('vDouble', TType::DOUBLE, 4); - $xfer += $output->writeDouble($this->vDouble); - $xfer += $output->writeFieldEnd(); - } - if ($this->vBool !== null) { - $xfer += $output->writeFieldBegin('vBool', TType::BOOL, 5); - $xfer += $output->writeBool($this->vBool); - $xfer += $output->writeFieldEnd(); - } - if ($this->vLong !== null) { - $xfer += $output->writeFieldBegin('vLong', TType::I64, 6); - $xfer += $output->writeI64($this->vLong); - $xfer += $output->writeFieldEnd(); - } - if ($this->vBinary !== null) { - $xfer += $output->writeFieldBegin('vBinary', TType::STRING, 7); - $xfer += $output->writeString($this->vBinary); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } -} diff --git a/thrift/jaeger/TagType.php b/thrift/jaeger/TagType.php deleted file mode 100644 index c526adaba..000000000 --- a/thrift/jaeger/TagType.php +++ /dev/null @@ -1,39 +0,0 @@ - 'STRING', - 1 => 'DOUBLE', - 2 => 'BOOL', - 3 => 'LONG', - 4 => 'BINARY', - ); -} - diff --git a/thrift/jaeger/composer.json b/thrift/jaeger/composer.json deleted file mode 100644 index a8a0adbd3..000000000 --- a/thrift/jaeger/composer.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "open-telemetry/gen-jaeger-thrift", - "description": "PHP Thrift files for communication with Jaeger.", - "keywords": ["opentelemetry", "otel", "tracing", "jaeger", "thrift"], - "type": "library", - "license": "Apache-2.0", - "authors": [ - { - "name": "opentelemetry-php contributors", - "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors" - } - ], - "require": { - "php": "^7.4 || ^8.0", - "packaged/thrift": "^0.15.0" - }, - "autoload": { - "psr-4": { - "Jaeger\\Thrift\\": "." - } - } -}