Skip to content

Commit c53299d

Browse files
mfulblavarou
authored andcommitted
fix(agent): Adds mongodb package supportability metric
1 parent f9b42e4 commit c53299d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

agent/lib_mongodb.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
#include "lib_mongodb_private.h"
2020

21+
#define PHP_PACKAGE_NAME "mongodb/mongodb"
22+
2123
static int nr_mongodb_is_server(const zval* obj TSRMLS_DC) {
2224
return nr_php_object_instanceof_class(obj,
2325
"MongoDB\\Driver\\Server" TSRMLS_CC);
@@ -445,7 +447,12 @@ void nr_mongodb_enable() {
445447
#endif /* OAPI */
446448

447449
if (NRINI(vulnerability_management_package_detection_enabled)) {
448-
nr_txn_add_php_package(NRPRG(txn), "mongodb/mongodb",
450+
nr_txn_add_php_package(NRPRG(txn), PHP_PACKAGE_NAME,
449451
PHP_PACKAGE_VERSION_UNKNOWN);
450452
}
453+
454+
nr_fw_support_add_package_supportability_metric(
455+
NRPRG(txn), PHP_PACKAGE_NAME, NULL,
456+
nr_php_packages_get_package(NRPRG(txn)->php_packages,
457+
PHP_PACKAGE_NAME));
451458
}

0 commit comments

Comments
 (0)