[PHP] Non-Web transactions sent through symfony-messenger component aren't displayed

Hi,

We are trying to show non-web transactions for background jobs sent through messages and queues with RabbitMQ and the Symfony Messenger component. Unfortunately, the non-web transactions aren’t shown. What we are doing wrong?

We are using:

And this is the newrelic config:

newrelic
newrelic.daemon.address => @newrelic
newrelic.daemon.app_connect_timeout => no value
newrelic.daemon.app_timeout => no value
newrelic.daemon.auditlog => no value
newrelic.daemon.collector_host => no value
newrelic.daemon.dont_launch => no value
newrelic.daemon.location => /usr/bin/newrelic-daemon
newrelic.daemon.logfile => /var/log/newrelic/newrelic-daemon.log
newrelic.daemon.loglevel => no value
newrelic.daemon.pidfile => no value
newrelic.daemon.port => @newrelic
newrelic.daemon.proxy => no value
newrelic.daemon.ssl_ca_bundle => no value
newrelic.daemon.ssl_ca_path => no value
newrelic.daemon.start_timeout => no value
newrelic.daemon.utilization.detect_aws => enabled
newrelic.daemon.utilization.detect_azure => enabled
newrelic.daemon.utilization.detect_docker => enabled
newrelic.daemon.utilization.detect_gcp => enabled
newrelic.daemon.utilization.detect_pcf => enabled
newrelic.feature_flag => no value
newrelic.high_security => 0
newrelic.logfile => /var/log/newrelic/php_agent.log
newrelic.loglevel => info
newrelic.preload_framework_library_detection => 1
newrelic.transaction_tracer.internal_functions_enabled => disabled
newrelic.allow_raw_exception_messages => 1 => 1
newrelic.analytics_events.capture_attributes => enabled => enabled
newrelic.analytics_events.enabled => enabled => enabled
newrelic.attributes.enabled => enabled => enabled
newrelic.attributes.exclude => no value => no value
newrelic.attributes.include => no value => no value
newrelic.browser_monitoring.attributes.enabled => disabled => disabled
newrelic.browser_monitoring.attributes.exclude => no value => no value
newrelic.browser_monitoring.attributes.include => no value => no value
newrelic.browser_monitoring.auto_instrument => enabled => enabled
newrelic.browser_monitoring.capture_attributes => disabled => disabled
newrelic.browser_monitoring.debug => disabled => disabled
newrelic.browser_monitoring.loader => rum => rum
newrelic.capture_params => off => off
newrelic.cross_application_tracer.enabled => enabled => enabled
newrelic.custom_insights_events.enabled => enabled => enabled
newrelic.custom_parameters_enabled => 1 => 1
newrelic.datastore_tracer.database_name_reporting.enabled => enabled => enabled
newrelic.datastore_tracer.instance_reporting.enabled => enabled => enabled
newrelic.distributed_tracing_enabled => 1 => 1
newrelic.distributed_tracing_exclude_newrelic_header => 0 => 0
newrelic.enabled => yes => yes
newrelic.error_collector.attributes.enabled => enabled => enabled
newrelic.error_collector.attributes.exclude => no value => no value
newrelic.error_collector.attributes.include => no value => no value
newrelic.error_collector.capture_attributes => enabled => enabled
newrelic.error_collector.capture_events => enabled => enabled
newrelic.error_collector.enabled => enabled => enabled
newrelic.error_collector.ignore_errors => no value => no value
newrelic.error_collector.ignore_exceptions => no value => no value
newrelic.error_collector.ignore_user_exception_handler => no => no
newrelic.error_collector.prioritize_api_errors => no => no
newrelic.error_collector.record_database_errors => yes => yes
newrelic.framework => auto-detect => auto-detect
newrelic.framework.drupal.modules => on => on
newrelic.framework.wordpress.hooks => on => on
newrelic.framework.wordpress.hooks_skip_filename => no value => no value
newrelic.guzzle.enabled => 1 => 1
newrelic.ignored_params => no value => no value
newrelic.infinite_tracing.span_events.agent_queue.size => 1000 => 1000
newrelic.infinite_tracing.span_events.agent_queue.timeout => 1s => 1s
newrelic.infinite_tracing.span_events.queue_size => 100000 => 100000
newrelic.infinite_tracing.trace_observer.host => no value => no value
newrelic.infinite_tracing.trace_observer.port => 443 => 443
newrelic.labels => no value => no value
newrelic.phpunit_events.enabled => disabled => disabled
newrelic.process_host.display_name => no value => no value
newrelic.security_policies_token => no value => no value
newrelic.span_events.attributes.enabled => enabled => enabled
newrelic.span_events.attributes.exclude => no value => no value
newrelic.span_events.attributes.include => no value => no value
newrelic.span_events_enabled => 1 => 1
newrelic.special.max_nesting_level => -1 => -1
newrelic.special.max_span_events => 0 => 0
newrelic.synthetics.enabled => enabled => enabled
newrelic.transaction_events.attributes.enabled => enabled => enabled
newrelic.transaction_events.attributes.exclude => no value => no value
newrelic.transaction_events.attributes.include => no value => no value
newrelic.transaction_events.enabled => enabled => enabled
newrelic.transaction_tracer.attributes.enabled => enabled => enabled
newrelic.transaction_tracer.attributes.exclude => no value => no value
newrelic.transaction_tracer.attributes.include => no value => no value
newrelic.transaction_tracer.capture_attributes => enabled => enabled
newrelic.transaction_tracer.custom => no value => no value
newrelic.transaction_tracer.detail => 1 => 1
newrelic.transaction_tracer.enabled => enabled => enabled
newrelic.transaction_tracer.explain_enabled => enabled => enabled
newrelic.transaction_tracer.explain_threshold => 500 => 500
newrelic.transaction_tracer.gather_input_queries => 1 => 1
newrelic.transaction_tracer.max_segments_cli => 100000 => 100000
newrelic.transaction_tracer.max_segments_web => 0 => 0
newrelic.transaction_tracer.record_sql => obfuscated => obfuscated
newrelic.transaction_tracer.slow_sql => enabled => enabled
newrelic.transaction_tracer.stack_trace_threshold => 500 => 500
newrelic.transaction_tracer.threshold => apdex_f => apdex_f
newrelic.webtransaction.name.files => no value => no value
newrelic.webtransaction.name.functions => no value => no value
newrelic.webtransaction.name.remove_trailing_path => no => no

Thank you

Hello @1d536ceef0412982d249,

Thank you for using our Online Technical Community! I’d be happy to help with this issue. The first thing I’d recommend is to make sure the output config you provided is from the output of php -i and not PHPinfo. Specifically, we would want the “Server API” section at the top of the output (not shown in the snippet you provided) shows as “Command Line Interface” to make sure the agent is installed in the CLI implementation of PHP.

If the agent is installed in the CLI implementation of PHP, it may be necessary to use the newrelic_background_job API call to gather this data. You can read more about this API call at the following link:

Hopefully this helps! Please let us know if you run into any problems or have any questions or concerns!