From 8e345365aeed0a279919561db4a7a2ce0f8c872b Mon Sep 17 00:00:00 2001 From: Luiz Carlos Manhani Junior <139877977+luizmanhani@users.noreply.github.com> Date: Thu, 13 Jun 2024 13:45:07 -0300 Subject: [PATCH] Revert "ensuring that options tags will not send array that will break the span" (#15) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Revert "ensuring that options tags will not send array that will break the sp…" This reverts commit 71c3ddd21a4b125560ba45a87af38804b7085736. --- src/Adapter/JaegerTracerFactory.php | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/src/Adapter/JaegerTracerFactory.php b/src/Adapter/JaegerTracerFactory.php index dfe7890..4ab3178 100644 --- a/src/Adapter/JaegerTracerFactory.php +++ b/src/Adapter/JaegerTracerFactory.php @@ -46,21 +46,15 @@ public function make(string $name): Tracer private function parseConfig(): array { - $options = $this->getConfig('options', [ - 'sampler' => [ - 'type' => SAMPLER_TYPE_CONST, - 'param' => true, - ], - 'logging' => false - ]); - - if (isset($options['tags'])) { - $options['tags'] = $this->sanitizeTags($options['tags']); - } - return [ $this->getConfig('name', 'skeleton'), - $options + $this->getConfig('options', [ + 'sampler' => [ + 'type' => SAMPLER_TYPE_CONST, + 'param' => true, + ], + 'logging' => false, + ]), ]; } @@ -73,13 +67,4 @@ private function getPrefix(): string { return rtrim($this->prefix . $this->name, '.') . '.'; } - - private function sanitizeTags(array $tags = []): array - { - $tagsSanitized = []; - foreach ($tags as $key => $value) { - $tagsSanitized[$key] = (is_array($value)) ? $value[0] : $value; - } - return $tagsSanitized; - } }