From 941f6d37965d17937dc85904807ffd486f743e0f Mon Sep 17 00:00:00 2001 From: Alessandro Chitolina Date: Fri, 15 Apr 2022 13:47:40 +0200 Subject: [PATCH] use http.url and http.method tags, instead of url and method --- src/Tracing/HttpClient/AbstractTraceableHttpClient.php | 4 ++-- tests/Tracing/HttpClient/TraceableHttpClientTest.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Tracing/HttpClient/AbstractTraceableHttpClient.php b/src/Tracing/HttpClient/AbstractTraceableHttpClient.php index 22f921bc..28edd8ff 100644 --- a/src/Tracing/HttpClient/AbstractTraceableHttpClient.php +++ b/src/Tracing/HttpClient/AbstractTraceableHttpClient.php @@ -53,8 +53,8 @@ public function request(string $method, string $url, array $options = []): Respo $context = new SpanContext(); $context->setOp('http.request'); $context->setTags([ - 'method' => $method, - 'url' => $url, + 'http.method' => $method, + 'http.url' => $url, ]); $span = $parent->startChild($context); diff --git a/tests/Tracing/HttpClient/TraceableHttpClientTest.php b/tests/Tracing/HttpClient/TraceableHttpClientTest.php index 5ae72757..9870d5ed 100644 --- a/tests/Tracing/HttpClient/TraceableHttpClientTest.php +++ b/tests/Tracing/HttpClient/TraceableHttpClientTest.php @@ -78,8 +78,8 @@ public function testRequest(): void $this->assertNull($spans[1]->getEndTimestamp()); $this->assertSame('http.request', $spans[1]->getOp()); $this->assertSame([ - 'method' => 'POST', - 'url' => 'http://www.example.org/test-page', + 'http.method' => 'POST', + 'http.url' => 'http://www.example.org/test-page', ], $spans[1]->getTags()); $response->getContent(false); @@ -89,8 +89,8 @@ public function testRequest(): void $this->assertNotNull($spans[1]->getEndTimestamp()); $this->assertSame('http.request', $spans[1]->getOp()); $this->assertSame([ - 'method' => 'POST', - 'url' => 'http://www.example.org/test-page', + 'http.method' => 'POST', + 'http.url' => 'http://www.example.org/test-page', ], $spans[1]->getTags()); }