(request_id: Option<i64>, info: &CurlInfo)
| 420 | } |
| 421 | |
| 422 | fn create_exit_span(request_id: Option<i64>, info: &CurlInfo) -> crate::Result<Span> { |
| 423 | let mut span = RequestContext::try_with_global_ctx(request_id, |ctx| { |
| 424 | Ok(ctx.create_exit_span(info.url.path(), &info.peer)) |
| 425 | })?; |
| 426 | |
| 427 | let span_object = span.span_object_mut(); |
| 428 | span_object.set_span_layer(SpanLayer::Http); |
| 429 | span_object.component_id = COMPONENT_PHP_CURL_ID; |
| 430 | span_object.add_tag("url", &info.raw_url); |
| 431 | |
| 432 | Ok(span) |
| 433 | } |
| 434 | |
| 435 | fn finish_exit_span(span: &mut impl HandleSpanObject, ch: &ZVal) -> crate::Result<()> { |
| 436 | let result = call("curl_getinfo", &mut [ch.clone()])?; |
no outgoing calls
no test coverage detected