| Conditions | 1 |
| Paths | 3 |
| Total Lines | 21 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | 6 | public function sendRequest(RequestInterface $request): ResponseInterface |
|
| 46 | { |
||
| 47 | 6 | $start = Stopwatch::start(); |
|
| 48 | 6 | $offset = $this->transaction->getStartOffset(); |
|
| 49 | |||
| 50 | try { |
||
| 51 | 6 | $request = $request->withAddedHeader( |
|
|
|
|||
| 52 | 6 | self::CORRELATION_ID_HEADER, |
|
| 53 | 6 | $this->transaction->getCorrelationId()->toString() |
|
| 54 | ); |
||
| 55 | |||
| 56 | 6 | return $this->client->sendRequest($request); |
|
| 57 | } finally { |
||
| 58 | 6 | $this->transaction->addSpan(new Span( |
|
| 59 | 6 | Stopwatch::stop($start), |
|
| 60 | 6 | sprintf('%s %s', $request->getMethod(), $request->getUri()->__toString()), |
|
| 61 | 6 | $offset, |
|
| 62 | 6 | 'http.request' |
|
| 63 | )); |
||
| 64 | } |
||
| 65 | } |
||
| 66 | } |
||
| 67 |