@@ -63,12 +63,12 @@ public function testRequest(): void
63
63
$ mockResponse = new MockResponse ();
64
64
$ decoratedHttpClient = new MockHttpClient ($ mockResponse );
65
65
$ httpClient = new TraceableHttpClient ($ decoratedHttpClient , $ this ->hub );
66
- $ response = $ httpClient ->request ('GET ' , 'https://www.example.com/test-page ' );
66
+ $ response = $ httpClient ->request ('GET ' , 'https://username:password@ www.example.com/test-page?foo=bar#baz ' );
67
67
68
68
$ this ->assertInstanceOf (AbstractTraceableResponse::class, $ response );
69
69
$ this ->assertSame (200 , $ response ->getStatusCode ());
70
70
$ this ->assertSame ('GET ' , $ response ->getInfo ('http_method ' ));
71
- $ this ->assertSame ('https://www.example.com/test-page ' , $ response ->getInfo ('url ' ));
71
+ $ this ->assertSame ('https://username:password@ www.example.com/test-page?foo=bar#baz ' , $ response ->getInfo ('url ' ));
72
72
$ this ->assertSame (['sentry-trace: ' . $ transaction ->toTraceparent ()], $ mockResponse ->getRequestOptions ()['normalized_headers ' ]['sentry-trace ' ]);
73
73
$ this ->assertArrayNotHasKey ('baggage ' , $ mockResponse ->getRequestOptions ()['normalized_headers ' ]);
74
74
$ this ->assertNotNull ($ transaction ->getSpanRecorder ());
@@ -82,7 +82,7 @@ public function testRequest(): void
82
82
$ this ->assertCount (2 , $ spans );
83
83
$ this ->assertNull ($ spans [1 ]->getEndTimestamp ());
84
84
$ this ->assertSame ('http.client ' , $ spans [1 ]->getOp ());
85
- $ this ->assertSame ('HTTP GET ' , $ spans [1 ]->getDescription ());
85
+ $ this ->assertSame ('GET https://www.example.com/test-page ' , $ spans [1 ]->getDescription ());
86
86
$ this ->assertSame ($ expectedTags , $ spans [1 ]->getTags ());
87
87
}
88
88
@@ -130,7 +130,7 @@ public function testRequestDoesNotContainBaggageHeader(): void
130
130
$ this ->assertCount (2 , $ spans );
131
131
$ this ->assertNull ($ spans [1 ]->getEndTimestamp ());
132
132
$ this ->assertSame ('http.client ' , $ spans [1 ]->getOp ());
133
- $ this ->assertSame ('HTTP PUT ' , $ spans [1 ]->getDescription ());
133
+ $ this ->assertSame ('PUT https://www.example.com/test-page ' , $ spans [1 ]->getDescription ());
134
134
$ this ->assertSame ($ expectedTags , $ spans [1 ]->getTags ());
135
135
}
136
136
@@ -178,7 +178,7 @@ public function testRequestDoesContainBaggageHeader(): void
178
178
$ this ->assertCount (2 , $ spans );
179
179
$ this ->assertNull ($ spans [1 ]->getEndTimestamp ());
180
180
$ this ->assertSame ('http.client ' , $ spans [1 ]->getOp ());
181
- $ this ->assertSame ('HTTP POST ' , $ spans [1 ]->getDescription ());
181
+ $ this ->assertSame ('POST https://www.example.com/test-page ' , $ spans [1 ]->getDescription ());
182
182
$ this ->assertSame ($ expectedTags , $ spans [1 ]->getTags ());
183
183
}
184
184
@@ -214,7 +214,7 @@ public function testStream(): void
214
214
$ this ->assertCount (2 , $ spans );
215
215
$ this ->assertNotNull ($ spans [1 ]->getEndTimestamp ());
216
216
$ this ->assertSame ('http.client ' , $ spans [1 ]->getOp ());
217
- $ this ->assertSame ('HTTP GET ' , $ spans [1 ]->getDescription ());
217
+ $ this ->assertSame ('GET https://www.example.com/test-page ' , $ spans [1 ]->getDescription ());
218
218
$ this ->assertSame ($ expectedTags , $ spans [1 ]->getTags ());
219
219
220
220
$ loopIndex = 0 ;
0 commit comments