Skip to content

Commit

Permalink
use http.url and http.method tags, instead of url and method
Browse files Browse the repository at this point in the history
  • Loading branch information
alekitto committed Apr 15, 2022
1 parent a951725 commit 941f6d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Tracing/HttpClient/AbstractTraceableHttpClient.php
Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions tests/Tracing/HttpClient/TraceableHttpClientTest.php
Expand Up @@ -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);
Expand All @@ -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());
}

Expand Down

0 comments on commit 941f6d3

Please sign in to comment.