@@ -449,28 +449,34 @@ extern void nr_txn_set_request_uri(nrtxn_t* txn, const char* uri);
449
449
*/
450
450
extern nr_status_t nr_txn_record_error_worthy (const nrtxn_t * txn , int priority );
451
451
452
+ #define NR_TXN_HIGH_SECURITY_ERROR_MESSAGE \
453
+ "Message removed by New Relic high_security setting"
454
+
455
+ #define NR_TXN_ALLOW_RAW_EXCEPTION_MESSAGE \
456
+ "Message removed by New Relic security settings"
457
+
452
458
/*
453
- * Purpose : Record the given error in the transaction.
459
+ * Purpose : Record the given error in the transaction with additional
460
+ * attributes being reported as user attributes. If the additional attributes
461
+ * are passed in as NULL, then they will not be reported.
454
462
*
455
463
* Params : 1. The transaction pointer.
456
464
* 2. The priority of the error. A higher number indicates a more
457
465
* serious error.
458
466
* 3. Whether to add the error to the current segment.
459
467
* 4. The error message.
460
468
* 5. The error class.
461
- * 6. Stack trace in JSON format.
469
+ * 6. The error line.
470
+ * 7. The error file.
471
+ * 8. The error context.
472
+ * 9. The error number.
473
+ * 10. The stack trace in JSON format.
462
474
*
463
475
* Returns : Nothing.
464
476
*
465
477
* Notes : This function will still record an error when high security is
466
478
* enabled but the message will be replaced with a placeholder.
467
479
*/
468
- #define NR_TXN_HIGH_SECURITY_ERROR_MESSAGE \
469
- "Message removed by New Relic high_security setting"
470
-
471
- #define NR_TXN_ALLOW_RAW_EXCEPTION_MESSAGE \
472
- "Message removed by New Relic security settings"
473
-
474
480
extern void nr_txn_record_error_with_additional_attributes (nrtxn_t * txn ,
475
481
int priority ,
476
482
bool add_to_current_segment ,
@@ -482,6 +488,22 @@ extern void nr_txn_record_error_with_additional_attributes(nrtxn_t* txn,
482
488
int error_no ,
483
489
const char * stacktrace_json );
484
490
491
+ /*
492
+ * Purpose : Record the given error in the transaction.
493
+ *
494
+ * Params : 1. The transaction pointer.
495
+ * 2. The priority of the error. A higher number indicates a more
496
+ * serious error.
497
+ * 3. Whether to add the error to the current segment.
498
+ * 4. The error message.
499
+ * 5. The error class.
500
+ * 6. Stack trace in JSON format.
501
+ *
502
+ * Returns : Nothing.
503
+ *
504
+ * Notes : This function will still record an error when high security is
505
+ * enabled but the message will be replaced with a placeholder.
506
+ */
485
507
extern void nr_txn_record_error (nrtxn_t * txn ,
486
508
int priority ,
487
509
bool add_to_segment ,
0 commit comments