Skip to content

Commit 2c72637

Browse files
hahuja2mfulb
authored andcommitted
chore(axiom): add description
1 parent 9f44c72 commit 2c72637

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
@@ -452,28 +452,34 @@ extern void nr_txn_set_request_uri(nrtxn_t* txn, const char* uri);
452452
*/
453453
extern nr_status_t nr_txn_record_error_worthy(const nrtxn_t* txn, int priority);
454454

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+
455461
/*
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.
457465
*
458466
* Params : 1. The transaction pointer.
459467
* 2. The priority of the error. A higher number indicates a more
460468
* serious error.
461469
* 3. Whether to add the error to the current segment.
462470
* 4. The error message.
463471
* 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.
465477
*
466478
* Returns : Nothing.
467479
*
468480
* Notes : This function will still record an error when high security is
469481
* enabled but the message will be replaced with a placeholder.
470482
*/
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-
477483
extern void nr_txn_record_error_with_additional_attributes(nrtxn_t* txn,
478484
int priority,
479485
bool add_to_current_segment,
@@ -485,6 +491,22 @@ extern void nr_txn_record_error_with_additional_attributes(nrtxn_t* txn,
485491
int error_no,
486492
const char* stacktrace_json);
487493

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+
*/
488510
extern void nr_txn_record_error(nrtxn_t* txn,
489511
int priority,
490512
bool add_to_segment,

0 commit comments

Comments
 (0)