File tree Expand file tree Collapse file tree 6 files changed +22
-2
lines changed
src/Zipkin/Instrumentation/Http Expand file tree Collapse file tree 6 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 88use Zipkin \SpanCustomizerShield ;
99use Zipkin \Propagation \TraceContext ;
1010use Zipkin \Kind ;
11+ use Zipkin \Instrumentation \Http \Client \Psr18 \Propagation \RequestHeaders ;
1112use Zipkin \Instrumentation \Http \Client \Parser ;
1213use Zipkin \Instrumentation \Http \Client \HttpClientTracing ;
1314use Throwable ;
Original file line number Diff line number Diff line change 1818 */
1919class DefaultParser implements Parser
2020{
21+ /**
22+ * @param RequestInterface $request
23+ */
2124 public function spanName ($ request ): string
2225 {
2326 self ::assertRequestType ($ request );
2427 return $ request ->getMethod ();
2528 }
2629
30+ /**
31+ * @param RequestInterface $request
32+ */
2733 public function request ($ request , TraceContext $ context , SpanCustomizer $ span ): void
2834 {
2935 self ::assertRequestType ($ request );
3036 $ span ->tag (Tags \HTTP_METHOD , $ request ->getMethod ());
3137 $ span ->tag (Tags \HTTP_PATH , $ request ->getUri ()->getPath () ?: "/ " );
3238 }
3339
40+ /**
41+ * @param ResponseInterface $response
42+ */
3443 public function response ($ response , TraceContext $ context , SpanCustomizer $ span ): void
3544 {
3645 self ::assertResponseType ($ response );
Original file line number Diff line number Diff line change 22
33declare (strict_types=1 );
44
5- namespace Zipkin \Instrumentation \Http \Client \Psr18 ;
5+ namespace Zipkin \Instrumentation \Http \Client \Psr18 \ Propagation ;
66
77use Zipkin \Propagation \RequestHeaders as BaseRequestHeaders ;
88use Zipkin \Propagation \RemoteSetter ;
Original file line number Diff line number Diff line change 1818 */
1919class DefaultParser implements Parser
2020{
21+ /**
22+ * @param ServerRequestInterface $request
23+ */
2124 public function spanName ($ request ): string
2225 {
2326 self ::assertRequestType ($ request );
2427 return $ request ->getMethod ();
2528 }
2629
30+ /**
31+ * @param ServerRequestInterface $request
32+ */
2733 public function request ($ request , TraceContext $ context , SpanCustomizer $ span ): void
2834 {
2935 self ::assertRequestType ($ request );
3036 $ span ->tag (Tags \HTTP_METHOD , $ request ->getMethod ());
3137 $ span ->tag (Tags \HTTP_PATH , $ request ->getUri ()->getPath () ?: "/ " );
3238 }
3339
40+ /**
41+ * @param ResponseInterface $response
42+ */
3443 public function response ($ response , TraceContext $ context , SpanCustomizer $ span ): void
3544 {
3645 self ::assertResponseType ($ response );
Original file line number Diff line number Diff line change 1111use Zipkin \Propagation \SamplingFlags ;
1212use Zipkin \Propagation \DefaultSamplingFlags ;
1313use Zipkin \Kind ;
14+ use Zipkin \Instrumentation \Http \Server \Psr15 \Propagation \RequestHeaders ;
1415use Zipkin \Instrumentation \Http \Server \Parser ;
1516use Zipkin \Instrumentation \Http \Server \HttpServerTracing ;
1617use Throwable ;
Original file line number Diff line number Diff line change 22
33declare (strict_types=1 );
44
5- namespace Zipkin \Instrumentation \Http \Server \Psr15 ;
5+ namespace Zipkin \Instrumentation \Http \Server \Psr15 \ Propagation ;
66
77use Zipkin \Propagation \RequestHeaders as BaseRequestHeaders ;
88use Zipkin \Propagation \RemoteSetter ;
You can’t perform that action at this time.
0 commit comments