Skip to content

Commit

Permalink
feat(agent): add message parameters ini
Browse files Browse the repository at this point in the history
  • Loading branch information
ZNeumann committed Oct 29, 2024
1 parent 5402097 commit 1cf64fe
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions agent/php_newrelic.h
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,12 @@ nrinibool_t
nrinibool_t
vulnerability_management_composer_api_enabled; /* newrelic.vulnerability_management.composer_api.enabled */

/*
* Configuration options for recording Messaging APIs
*/
nrinibool_t
message_tracer_segment_parameters_enabled; /* newrelic.segment_tracer.segment_parameters.enabled */

#if ZEND_MODULE_API_NO < ZEND_7_4_X_API_NO
/*
* pid and user_function_wrappers are used to store user function wrappers.
Expand Down
11 changes: 11 additions & 0 deletions agent/php_nrini.c
Original file line number Diff line number Diff line change
Expand Up @@ -3100,6 +3100,17 @@ STD_PHP_INI_ENTRY_EX("newrelic.vulnerability_management.composer_api.enabled",
newrelic_globals,
nr_enabled_disabled_dh)

/*
* Messaging API
*/
STD_PHP_INI_ENTRY_EX("newrelic.message_tracer.segment_parameters.enabled",
"1",
NR_PHP_REQUEST,
nr_boolean_mh,
message_tracer_segment_parameters_enabled,
zend_newrelic_globals,
newrelic_globals,
nr_enabled_disabled_dh)
PHP_INI_END() /* } */

void nr_php_register_ini_entries(int module_number TSRMLS_DC) {
Expand Down
9 changes: 9 additions & 0 deletions agent/scripts/newrelic.ini.template
Original file line number Diff line number Diff line change
Expand Up @@ -1341,3 +1341,12 @@ newrelic.daemon.logfile = "/var/log/newrelic/newrelic-daemon.log"
; to gather package information for vulnerability management.
;
;newrelic.vulnerability_management.composer_api.enabled = false

; Setting: newrelic.message_tracer.segment_parameters.enabled
; Type : boolean
; Scope : per-directory
; Default: true
; Info : If this setting is true, then message parameters will be captured and
; stored on their respective segments.
;
;newrelic.message_tracer.segment_parameters.enabled = true

0 comments on commit 1cf64fe

Please sign in to comment.