Skip to content

Commit c5a40cc

Browse files
committed
chore(axiom): add description
1 parent e177f40 commit c5a40cc

File tree

1 file changed

+30
-8
lines changed

1 file changed

+30
-8
lines changed

axiom/nr_txn.h

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -449,28 +449,34 @@ extern void nr_txn_set_request_uri(nrtxn_t* txn, const char* uri);
449449
*/
450450
extern nr_status_t nr_txn_record_error_worthy(const nrtxn_t* txn, int priority);
451451

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+
452458
/*
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.
454462
*
455463
* Params : 1. The transaction pointer.
456464
* 2. The priority of the error. A higher number indicates a more
457465
* serious error.
458466
* 3. Whether to add the error to the current segment.
459467
* 4. The error message.
460468
* 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.
462474
*
463475
* Returns : Nothing.
464476
*
465477
* Notes : This function will still record an error when high security is
466478
* enabled but the message will be replaced with a placeholder.
467479
*/
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-
474480
extern void nr_txn_record_error_with_additional_attributes(nrtxn_t* txn,
475481
int priority,
476482
bool add_to_current_segment,
@@ -482,6 +488,22 @@ extern void nr_txn_record_error_with_additional_attributes(nrtxn_t* txn,
482488
int error_no,
483489
const char* stacktrace_json);
484490

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+
*/
485507
extern void nr_txn_record_error(nrtxn_t* txn,
486508
int priority,
487509
bool add_to_segment,

0 commit comments

Comments
 (0)