Skip to content

Commit

Permalink
feat: add beforeSend to RUM init
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnwesson committed Jul 16, 2024
1 parent 8ff3807 commit cc9fc4e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/DatadogLoggingService.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ class DatadogLoggingService extends NewRelicLoggingService {
this.initialize();
}

beforeSend(event, context) {

Check failure on line 30 in src/DatadogLoggingService.js

View workflow job for this annotation

GitHub Actions / tests

'event' is defined but never used

Check failure on line 30 in src/DatadogLoggingService.js

View workflow job for this annotation

GitHub Actions / tests

'context' is defined but never used
// common/shared logic across all MFEs
return true;
}

initialize() {
const requiredDatadogConfig = [
process.env.DATADOG_APPLICATION_ID,
Expand All @@ -42,6 +47,7 @@ class DatadogLoggingService extends NewRelicLoggingService {
const datadogVersion = process.env.DATADOG_VERSION || process.env.APP_VERSION || '1.0.0';
datadogRum.init({
applicationId: process.env.DATADOG_APPLICATION_ID,
beforeSend: this.beforeSend,
clientToken: process.env.DATADOG_CLIENT_TOKEN,
site: process.env.DATADOG_SITE || '',
service: process.env.DATADOG_SERVICE || '',
Expand Down

0 comments on commit cc9fc4e

Please sign in to comment.