From 8f3646a9c93a06f76f6abb31020fdb74b4b1fc59 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 9 Apr 2023 20:50:33 +0300 Subject: exp: jaeger tracing --- .../ReporterFactory/JaegerReporterFactory.php | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/JaegerReporterFactory.php (limited to 'vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/JaegerReporterFactory.php') diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/JaegerReporterFactory.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/JaegerReporterFactory.php new file mode 100644 index 000000000..9865884b5 --- /dev/null +++ b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/ReporterFactory/JaegerReporterFactory.php @@ -0,0 +1,44 @@ +config->getLocalAgentReportingHost(), + $this->config->getLocalAgentReportingPort(), + $this->config->getLogger(), + $this->config + ); + + $transport = new TBufferedTransport( + $udp, + $this->config->getMaxBufferLength(), + $this->config->getMaxBufferLength() + ); + + try { + $transport->open(); + } catch (TTransportException $e) { + $this->config->getLogger()->warning($e->getMessage()); + } + $protocol = new TBinaryProtocol($transport); + $client = new AgentClient($protocol); + $this->config->getLogger()->debug('Initializing UDP Jaeger Tracer with Jaeger.Thrift over Binary protocol'); + $sender = new JaegerSender($client, $this->config->getLogger()); + $sender->setMaxBufferLength($this->config->getMaxBufferLength()); + return new JaegerReporter($sender); + } +} -- cgit v1.2.3