@@ -196,9 +196,14 @@ static inline void nr_php_amqplib_get_host_and_port(
196
196
}
197
197
198
198
/*
199
- * Purpose : Applies DT headers to an inbound AMQPMessage if
200
- * newrelic.distributed_tracing_exclude_newrelic_header INI setting is false and
201
- * if the headers don't already exist on the AMQPMessage.
199
+ * Purpose : Applies DT headers to an inbound AMQPMessage.
200
+ * Note:
201
+ * The DT header 'newrelic' will only be added if both
202
+ * newrelic.distributed_tracing_enabled is enabled and
203
+ * newrelic.distributed_tracing_exclude_newrelic_header is set to false in the
204
+ * INI settings. The W3C headers 'traceparent' and 'tracestate' will will only
205
+ * be added if newrelic.distributed_tracing_enabled is enabled in the
206
+ * newrelic.ini settings.
202
207
*
203
208
* Params : PhpAmqpLib\Message\AMQPMessage
204
209
*
@@ -227,8 +232,13 @@ static inline void nr_php_amqplib_insert_dt_headers(zval* amqp_msg) {
227
232
int retval = FAILURE ;
228
233
229
234
/*
230
- * Note, this functionality can be disabled by toggling the
231
- * newrelic.distributed_tracing_exclude_newrelic_header INI setting.
235
+ * Note:
236
+ * The DT header 'newrelic' will only be added if both
237
+ * newrelic.distributed_tracing_enabled is enabled and
238
+ * newrelic.distributed_tracing_exclude_newrelic_header is set to false in the
239
+ * INI settings. The W3C headers 'traceparent' and 'tracestate' will will only
240
+ * be added if newrelic.distributed_tracing_enabled is enabled in the
241
+ * newrelic.ini settings.
232
242
*/
233
243
234
244
/*
@@ -253,8 +263,13 @@ static inline void nr_php_amqplib_insert_dt_headers(zval* amqp_msg) {
253
263
}
254
264
255
265
/*
256
- * newrelic_get_request_metadata is an internal API that will only return DT
257
- * headers if newrelic.distributed_tracing_exclude_newrelic_header is false.
266
+ * newrelic_get_request_metadata is an internal API that will only return the
267
+ * DT header 'newrelic' will only be added if both
268
+ * newrelic.distributed_tracing_enabled is enabled and
269
+ * newrelic.distributed_tracing_exclude_newrelic_header is set to false in the
270
+ * INI settings. The W3C headers 'traceparent' and 'tracestate' will will only
271
+ * be returned if newrelic.distributed_tracing_enabled is enabled in the
272
+ * newrelic.ini settings.
258
273
*/
259
274
dt_headers_zvf = nr_php_call (NULL , "newrelic_get_request_metadata" );
260
275
if (!nr_php_is_zval_valid_array (dt_headers_zvf )) {
@@ -490,9 +505,15 @@ static inline void nr_php_amqplib_retrieve_dt_headers(zval* amqp_msg) {
490
505
491
506
/*
492
507
* Purpose : A wrapper to instrument the php-amqplib basic_publish. This
493
- * retrieves values to populate a message segment. If
494
- * newrelic.distributed_tracing_exclude_newrelic_header is false, it will also
495
- * insert the DT headers.
508
+ * retrieves values to populate a message segment and insert the DT headers, if
509
+ * applicable.
510
+ *
511
+ * Note: The DT header 'newrelic' will only be added if both
512
+ * newrelic.distributed_tracing_enabled is enabled and
513
+ * newrelic.distributed_tracing_exclude_newrelic_header is set to false in the
514
+ * INI settings. The W3C headers 'traceparent' and 'tracestate' will will only
515
+ * be added if newrelic.distributed_tracing_enabled is enabled in the
516
+ * newrelic.ini settings.
496
517
*
497
518
* PhpAmqpLib\Channel\AMQPChannel::basic_publish
498
519
* Publishes a message
@@ -610,8 +631,14 @@ NR_PHP_WRAPPER_END
610
631
611
632
/*
612
633
* Purpose : A wrapper to instrument the php-amqplib basic_get. This
613
- * retrieves values to populate a message segment. If
614
- * newrelic.distributed_tracing_exclude_newrelic_header is false, it will also
634
+ * retrieves values to populate a message segment.
635
+ * Note:
636
+ * The DT header 'newrelic' will only be considered if both
637
+ * newrelic.distributed_tracing_enabled is enabled and
638
+ * newrelic.distributed_tracing_exclude_newrelic_header is set to false in the
639
+ * INI settings. The W3C headers 'traceparent' and 'tracestate' will will only
640
+ * be considered if newrelic.distributed_tracing_enabled is enabled in the
641
+ * newrelic.ini settings. If settings are correct, it will
615
642
* retrieve the DT headers and, if applicable, apply to the txn.
616
643
*
617
644
* PhpAmqpLib\Channel\AMQPChannel::basic_get
0 commit comments