(
style: ApiStyle, request_id: Option<i64>, class_name: Option<&str>, function_name: &str,
remote_peer: &str, tag_info: &TagInfo<'_>, key: Option<&str>,
)
| 244 | } |
| 245 | |
| 246 | fn create_exit_span( |
| 247 | style: ApiStyle, request_id: Option<i64>, class_name: Option<&str>, function_name: &str, |
| 248 | remote_peer: &str, tag_info: &TagInfo<'_>, key: Option<&str>, |
| 249 | ) -> anyhow::Result<Span> { |
| 250 | RequestContext::try_with_global_ctx(request_id, |ctx| { |
| 251 | let mut span = ctx.create_exit_span( |
| 252 | &style.generate_operation_name(class_name, function_name), |
| 253 | remote_peer, |
| 254 | ); |
| 255 | |
| 256 | let span_object = span.span_object_mut(); |
| 257 | span_object.set_span_layer(SpanLayer::Cache); |
| 258 | span_object.component_id = COMPONENT_PHP_MEMCACHED_ID; |
| 259 | span_object.add_tag(TAG_CACHE_TYPE, "memcache"); |
| 260 | if let Some(cmd) = tag_info.cmd { |
| 261 | span_object.add_tag(TAG_CACHE_CMD, cmd); |
| 262 | } |
| 263 | if let Some(op) = &tag_info.op { |
| 264 | span_object.add_tag(TAG_CACHE_OP, op.to_string()); |
| 265 | }; |
| 266 | if let Some(key) = key { |
| 267 | span_object.add_tag(TAG_CACHE_KEY, key) |
| 268 | } |
| 269 | |
| 270 | Ok(span) |
| 271 | }) |
| 272 | } |
| 273 | |
| 274 | fn get_peer(this: &mut ZObj) -> String { |
| 275 | let handle = this.handle(); |
no test coverage detected