Skip to content

Commit

Permalink
feat(newrelic): add shutdown method (#4571)
Browse files Browse the repository at this point in the history
Co-authored-by: Kenny <[email protected]>
  • Loading branch information
kennyt276 and Kenny authored Jul 11, 2023
1 parent fbd523f commit 178f566
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/@awesome-cordova-plugins/plugins/newrelic/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ export class NewRelic extends AwesomeCordovaNativePlugin {
return; // We add return; here to avoid any IDE / Compiler errors
}


/**
* Throws a demo run-time exception to test New Relic crash reporting.
* @param {string} message An optional argument attached to the exception.
Expand Down Expand Up @@ -304,7 +303,7 @@ export class NewRelic extends AwesomeCordovaNativePlugin {
noticeNetworkFailure(url: string, method: string, startTime: Number, endTime: Number, failure: string): void {
return; // We add return; here to avoid any IDE / Compiler errors
}

/**
* Records JavaScript errors for ionic.
* @param {Error} err The error to report.
Expand All @@ -315,5 +314,14 @@ export class NewRelic extends AwesomeCordovaNativePlugin {
recordError(err: Error): void {
return; // We add return; here to avoid any IDE / Compiler errors
}


/**
* Shut down the agent within the current application lifecycle during runtime.
*/
@Cordova({
sync: true,
})
shutdown(): void {
return; // We add return; here to avoid any IDE / Compiler errors
}
}

0 comments on commit 178f566

Please sign in to comment.