Skip to content

Commit 199adcb

Browse files
mfulblavarou
authored andcommitted
fix(agent): Adds package major number metric for lumen
1 parent c53299d commit 199adcb

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

agent/fw_lumen.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@
1111
#include "php_wrapper.h"
1212
#include "php_hash.h"
1313
#include "fw_hooks.h"
14+
#include "fw_support.h"
1415
#include "util_logging.h"
1516
#include "util_memory.h"
1617
#include "util_strings.h"
1718

19+
#define PHP_PACKAGE_NAME "laravel/lumen-framework"
20+
1821
/*
1922
* Sets the web transaction name. If strip_base == true,
2023
* leading class path components will be stripped.
@@ -232,7 +235,12 @@ void nr_lumen_enable(TSRMLS_D) {
232235
#endif
233236

234237
if (NRINI(vulnerability_management_package_detection_enabled)) {
235-
nr_txn_add_php_package(NRPRG(txn), "laravel/lumen-framework",
238+
nr_txn_add_php_package(NRPRG(txn), PHP_PACKAGE_NAME,
236239
PHP_PACKAGE_VERSION_UNKNOWN);
237240
}
241+
242+
nr_fw_support_add_package_supportability_metric(
243+
NRPRG(txn), PHP_PACKAGE_NAME, NULL,
244+
nr_php_packages_get_package(NRPRG(txn)->php_packages,
245+
PHP_PACKAGE_NAME));
238246
}

0 commit comments

Comments
 (0)