@@ -6,16 +6,16 @@ |
||
| 6 | 6 | |
| 7 | 7 | class TraceIdHeaderRetriever |
| 8 | 8 | { |
| 9 | - public function retrieve(array $carrier = [], $headerName = TraceContextPropagator::TRACEPARENT): ?string |
|
| 9 | + public function retrieve(array $carrier = [ ], $headerName = TraceContextPropagator::TRACEPARENT): ?string |
|
| 10 | 10 | { |
| 11 | - if (empty($carrier[$headerName])) { |
|
| 11 | + if (empty($carrier[ $headerName ])) { |
|
| 12 | 12 | return null; |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | - if (is_array($carrier[$headerName])) { |
|
| 16 | - return $carrier[$headerName][0]; |
|
| 15 | + if (is_array($carrier[ $headerName ])) { |
|
| 16 | + return $carrier[ $headerName ][ 0 ]; |
|
| 17 | 17 | } |
| 18 | 18 | |
| 19 | - return $carrier[$headerName]; |
|
| 19 | + return $carrier[ $headerName ]; |
|
| 20 | 20 | } |
| 21 | 21 | } |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | $traceStateHeader = $this->traceIdHeaderRetriever->retrieve(iterator_to_array($request->headers), TraceContextPropagator::TRACESTATE); |
| 47 | 47 | |
| 48 | 48 | $this->spanCreator->create( |
| 49 | - Caller::call(Config::get('jaravel.http.span_name'), [$request]), |
|
| 49 | + Caller::call(Config::get('jaravel.http.span_name'), [ $request ]), |
|
| 50 | 50 | $traceIdHeader, |
| 51 | 51 | $traceStateHeader |
| 52 | 52 | )->activate(); |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | 'type' => 'http', |
| 69 | 69 | ]); |
| 70 | 70 | |
| 71 | - SpanTagHelper::setTags($span, Caller::call($callableConfig, [$request, $response])); |
|
| 71 | + SpanTagHelper::setTags($span, Caller::call($callableConfig, [ $request, $response ])); |
|
| 72 | 72 | |
| 73 | 73 | $span->end(); |
| 74 | 74 | $scope->detach(); |