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