@@ -109,7 +109,7 @@ void nr_mongodb_get_host_and_port_path_or_id(zval* server,
109109}
110110
111111#if ZEND_MODULE_API_NO < ZEND_8_0_X_API_NO \
112- || defined OVERWRITE_ZEND_EXECUTE_DATA
112+ || defined OVERWRITE_ZEND_EXECUTE_DATA
113113NR_PHP_WRAPPER (nr_mongodb_operation ) {
114114 const char * this_klass = "MongoDB\\Operation\\Executable" ;
115115 zval * collection = NULL ;
@@ -178,10 +178,10 @@ NR_PHP_WRAPPER_END
178178#else
179179
180180NR_PHP_WRAPPER (nr_mongodb_operation_before ) {
181- (void )wraprec ;
182- nr_segment_t * segment ;
183- segment = nr_segment_start (NRPRG (txn ), NULL , NULL );
184- segment -> wraprec = auto_segment -> wraprec ;
181+ (void )wraprec ;
182+ nr_segment_t * segment ;
183+ segment = nr_segment_start (NRPRG (txn ), NULL , NULL );
184+ segment -> wraprec = auto_segment -> wraprec ;
185185}
186186NR_PHP_WRAPPER_END
187187
@@ -221,14 +221,12 @@ NR_PHP_WRAPPER(nr_mongodb_operation_after) {
221221 goto leave ;
222222 }
223223
224- collection
225- = nr_php_get_zval_object_property (this_var , "collectionName" );
224+ collection = nr_php_get_zval_object_property (this_var , "collectionName" );
226225 if (nr_php_is_zval_valid_string (collection )) {
227226 params .collection = Z_STRVAL_P (collection );
228227 }
229228
230- database
231- = nr_php_get_zval_object_property (this_var , "databaseName" );
229+ database = nr_php_get_zval_object_property (this_var , "databaseName" );
232230 if (nr_php_is_zval_valid_string (database )) {
233231 instance .database_name = Z_STRVAL_P (database );
234232 }
@@ -257,127 +255,81 @@ void nr_mongodb_enable() {
257255#if ZEND_MODULE_API_NO >= ZEND_8_0_X_API_NO \
258256 && !defined OVERWRITE_ZEND_EXECUTE_DATA
259257
260- nr_php_wrap_user_function_before_after_clean_extra (
261- NR_PSTR ("MongoDB\\Operation\\Aggregate::execute" ),
262- nr_mongodb_operation_before ,
263- nr_mongodb_operation_after ,
264- nr_mongodb_operation_after ,
265- "aggregate"
266- );
267-
268- nr_php_wrap_user_function_before_after_clean_extra (
269- NR_PSTR ("MongoDB\\Operation\\BulkWrite::execute" ),
270- nr_mongodb_operation_before ,
271- nr_mongodb_operation_after ,
272- nr_mongodb_operation_after ,
273- "bulkWrite"
274- );
275-
276- nr_php_wrap_user_function_before_after_clean_extra (
277- NR_PSTR ("MongoDB\\Operation\\Count::execute" ),
278- nr_mongodb_operation_before ,
279- nr_mongodb_operation_after ,
280- nr_mongodb_operation_after ,
281- "count"
282- );
283-
284- nr_php_wrap_user_function_before_after_clean_extra (
285- NR_PSTR ("MongoDB\\Operation\\CreateIndexes::execute" ),
286- nr_mongodb_operation_before ,
287- nr_mongodb_operation_after ,
288- nr_mongodb_operation_after ,
289- "createIndexes"
290- );
291-
292- nr_php_wrap_user_function_before_after_clean_extra (
293- NR_PSTR ("MongoDB\\Operation\\Delete::execute" ),
294- nr_mongodb_operation_before ,
295- nr_mongodb_operation_after ,
296- nr_mongodb_operation_after ,
297- "delete"
298- );
299-
300- nr_php_wrap_user_function_before_after_clean_extra (
301- NR_PSTR ("MongoDB\\Operation\\Distinct::execute" ),
302- nr_mongodb_operation_before ,
303- nr_mongodb_operation_after ,
304- nr_mongodb_operation_after ,
305- "distinct"
306- );
307-
308- nr_php_wrap_user_function_before_after_clean_extra (
309- NR_PSTR ("MongoDB\\Operation\\DropCollection::execute" ),
310- nr_mongodb_operation_before ,
311- nr_mongodb_operation_after ,
312- nr_mongodb_operation_after ,
313- "dropCollection"
314- );
315-
316- nr_php_wrap_user_function_before_after_clean_extra (
317- NR_PSTR ("MongoDB\\Operation\\DropIndexes::execute" ),
318- nr_mongodb_operation_before ,
319- nr_mongodb_operation_after ,
320- nr_mongodb_operation_after ,
321- "dropIndexes"
322- );
323-
324- nr_php_wrap_user_function_before_after_clean_extra (
325- NR_PSTR ("MongoDB\\Operation\\Find::execute" ),
326- nr_mongodb_operation_before ,
327- nr_mongodb_operation_after ,
328- nr_mongodb_operation_after ,
329- "find"
330- );
331-
332- nr_php_wrap_user_function_before_after_clean_extra (
333- NR_PSTR ("MongoDB\\Operation\\FindAndModify::execute" ),
334- nr_mongodb_operation_before ,
335- nr_mongodb_operation_after ,
336- nr_mongodb_operation_after ,
337- "findAndModify"
338- );
339-
340- nr_php_wrap_user_function_before_after_clean_extra (
341- NR_PSTR ("MongoDB\\Operation\\InsertMany::execute" ),
342- nr_mongodb_operation_before ,
343- nr_mongodb_operation_after ,
344- nr_mongodb_operation_after ,
345- "insertMany"
346- );
347-
348- nr_php_wrap_user_function_before_after_clean_extra (
349- NR_PSTR ("MongoDB\\Operation\\InsertOne::execute" ),
350- nr_mongodb_operation_before ,
351- nr_mongodb_operation_after ,
352- nr_mongodb_operation_after ,
353- "insertOne"
354- );
355-
356- nr_php_wrap_user_function_before_after_clean_extra (
357- NR_PSTR ("MongoDB\\Operation\\ListIndexes::execute" ),
358- nr_mongodb_operation_before ,
359- nr_mongodb_operation_after ,
360- nr_mongodb_operation_after ,
361- "listIndexes"
362- );
363-
364- nr_php_wrap_user_function_before_after_clean_extra (
365- NR_PSTR ("MongoDB\\Operation\\Update::execute" ),
366- nr_mongodb_operation_before ,
367- nr_mongodb_operation_after ,
368- nr_mongodb_operation_after ,
369- "update"
370- );
371-
372- nr_php_wrap_user_function_before_after_clean_extra (
373- NR_PSTR ("MongoDB\\Operation\\DatabaseCommand::execute" ),
374- nr_mongodb_operation_before ,
375- nr_mongodb_operation_after ,
376- nr_mongodb_operation_after ,
377- "databaseCommand"
378- );
379-
380- #else /* Non-OAPI */
258+ nr_php_wrap_user_function_before_after_clean_extra (
259+ NR_PSTR ("MongoDB\\Operation\\Aggregate::execute" ),
260+ nr_mongodb_operation_before , nr_mongodb_operation_after ,
261+ nr_mongodb_operation_after , "aggregate" );
262+
263+ nr_php_wrap_user_function_before_after_clean_extra (
264+ NR_PSTR ("MongoDB\\Operation\\BulkWrite::execute" ),
265+ nr_mongodb_operation_before , nr_mongodb_operation_after ,
266+ nr_mongodb_operation_after , "bulkWrite" );
267+
268+ nr_php_wrap_user_function_before_after_clean_extra (
269+ NR_PSTR ("MongoDB\\Operation\\Count::execute" ),
270+ nr_mongodb_operation_before , nr_mongodb_operation_after ,
271+ nr_mongodb_operation_after , "count" );
272+
273+ nr_php_wrap_user_function_before_after_clean_extra (
274+ NR_PSTR ("MongoDB\\Operation\\CreateIndexes::execute" ),
275+ nr_mongodb_operation_before , nr_mongodb_operation_after ,
276+ nr_mongodb_operation_after , "createIndexes" );
277+
278+ nr_php_wrap_user_function_before_after_clean_extra (
279+ NR_PSTR ("MongoDB\\Operation\\Delete::execute" ),
280+ nr_mongodb_operation_before , nr_mongodb_operation_after ,
281+ nr_mongodb_operation_after , "delete" );
282+
283+ nr_php_wrap_user_function_before_after_clean_extra (
284+ NR_PSTR ("MongoDB\\Operation\\Distinct::execute" ),
285+ nr_mongodb_operation_before , nr_mongodb_operation_after ,
286+ nr_mongodb_operation_after , "distinct" );
287+
288+ nr_php_wrap_user_function_before_after_clean_extra (
289+ NR_PSTR ("MongoDB\\Operation\\DropCollection::execute" ),
290+ nr_mongodb_operation_before , nr_mongodb_operation_after ,
291+ nr_mongodb_operation_after , "dropCollection" );
292+
293+ nr_php_wrap_user_function_before_after_clean_extra (
294+ NR_PSTR ("MongoDB\\Operation\\DropIndexes::execute" ),
295+ nr_mongodb_operation_before , nr_mongodb_operation_after ,
296+ nr_mongodb_operation_after , "dropIndexes" );
297+
298+ nr_php_wrap_user_function_before_after_clean_extra (
299+ NR_PSTR ("MongoDB\\Operation\\Find::execute" ), nr_mongodb_operation_before ,
300+ nr_mongodb_operation_after , nr_mongodb_operation_after , "find" );
301+
302+ nr_php_wrap_user_function_before_after_clean_extra (
303+ NR_PSTR ("MongoDB\\Operation\\FindAndModify::execute" ),
304+ nr_mongodb_operation_before , nr_mongodb_operation_after ,
305+ nr_mongodb_operation_after , "findAndModify" );
306+
307+ nr_php_wrap_user_function_before_after_clean_extra (
308+ NR_PSTR ("MongoDB\\Operation\\InsertMany::execute" ),
309+ nr_mongodb_operation_before , nr_mongodb_operation_after ,
310+ nr_mongodb_operation_after , "insertMany" );
311+
312+ nr_php_wrap_user_function_before_after_clean_extra (
313+ NR_PSTR ("MongoDB\\Operation\\InsertOne::execute" ),
314+ nr_mongodb_operation_before , nr_mongodb_operation_after ,
315+ nr_mongodb_operation_after , "insertOne" );
316+
317+ nr_php_wrap_user_function_before_after_clean_extra (
318+ NR_PSTR ("MongoDB\\Operation\\ListIndexes::execute" ),
319+ nr_mongodb_operation_before , nr_mongodb_operation_after ,
320+ nr_mongodb_operation_after , "listIndexes" );
321+
322+ nr_php_wrap_user_function_before_after_clean_extra (
323+ NR_PSTR ("MongoDB\\Operation\\Update::execute" ),
324+ nr_mongodb_operation_before , nr_mongodb_operation_after ,
325+ nr_mongodb_operation_after , "update" );
326+
327+ nr_php_wrap_user_function_before_after_clean_extra (
328+ NR_PSTR ("MongoDB\\Operation\\DatabaseCommand::execute" ),
329+ nr_mongodb_operation_before , nr_mongodb_operation_after ,
330+ nr_mongodb_operation_after , "databaseCommand" );
331+
332+ #else /* Non-OAPI */
381333
382334 /*
383335 * We instrument interesting methods on the MongoDB\Collection class via their
0 commit comments