MCPcopy Create free account
hub / github.com/apache/skywalking-php / hook_memcache_empty_methods

Method hook_memcache_empty_methods

src/plugin/plugin_memcache.rs:164–190  ·  view source on GitHub ↗
(
        &self, class_name: Option<String>, function_name: String, style: ApiStyle,
    )

Source from the content-addressed store, hash-verified

162
163 #[instrument(skip_all)]
164 fn hook_memcache_empty_methods(
165 &self, class_name: Option<String>, function_name: String, style: ApiStyle,
166 ) -> (Box<BeforeExecuteHook>, Box<AfterExecuteHook>) {
167 (
168 Box::new(move |request_id, execute_data| {
169 let tag_info = MEMCACHE_EMPTY_METHOD_MAPPING
170 .get(&*get_tag_key(class_name.as_deref(), &function_name))
171 .unwrap();
172
173 let this = style.get_this_mut(execute_data)?;
174 let peer = get_peer(this);
175
176 let span = create_exit_span(
177 style,
178 request_id,
179 class_name.as_deref(),
180 &function_name,
181 &peer,
182 tag_info,
183 None,
184 )?;
185
186 Ok(Box::new(span))
187 }),
188 Box::new(after_hook),
189 )
190 }
191
192 #[instrument(skip_all)]
193 fn hook_memcache_key_methods(

Callers 1

hookMethod · 0.80

Calls 4

get_tag_keyFunction · 0.85
get_this_mutMethod · 0.80
get_peerFunction · 0.70
create_exit_spanFunction · 0.70

Tested by

no test coverage detected