File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,15 @@ class DatadogLoggingService extends NewRelicLoggingService {
27
27
this . initialize ( ) ;
28
28
}
29
29
30
+ // to read more about the use cases for beforeSend, refer to the documentation:
31
+ // https://docs.datadoghq.com/real_user_monitoring/guide/enrich-and-control-rum-data/?tab=event#event-and-context-structure
32
+ // (e.g., discarding frontend errors matching the optional `IGNORED_ERROR_REGEX` configuration,
33
+ // currently implemented in `logError` below).
34
+ beforeSend ( ) {
35
+ // common/shared logic across all MFEs
36
+ return true ;
37
+ }
38
+
30
39
initialize ( ) {
31
40
const requiredDatadogConfig = [
32
41
process . env . DATADOG_APPLICATION_ID ,
@@ -42,6 +51,7 @@ class DatadogLoggingService extends NewRelicLoggingService {
42
51
const datadogVersion = process . env . DATADOG_VERSION || process . env . APP_VERSION || '1.0.0' ;
43
52
datadogRum . init ( {
44
53
applicationId : process . env . DATADOG_APPLICATION_ID ,
54
+ beforeSend : this . beforeSend ,
45
55
clientToken : process . env . DATADOG_CLIENT_TOKEN ,
46
56
site : process . env . DATADOG_SITE || '' ,
47
57
service : process . env . DATADOG_SERVICE || '' ,
You can’t perform that action at this time.
0 commit comments