@dineroregnskab/datadog-initializer v3.0.6
@dineroregnskab/datadog-initializer
Datadog initialization of both Logs and RUM.
This package contains a datadog-initializer.js
file that can be included in browsers.
Enrichers
Included enrichers for Logs
and RUM
:
- None
These can be accessed on the global object: DD_INITIALIZER.enrichers
Filters
Included filters for Logs
and RUM
:
- Discard HTTP errors with status code
0
- Discard HTTP errors with
0 Unknown Error
message
These can be accessed on the global object: DD_INITIALIZER.filters
Templates:
Logs & RUM:
export const enricher = {
logs: {
enricherName: (event: LogsEvent): void => {
// Append data to log object.
},
},
rum: {
enricherName: (
event: RumEvent,
context: RumEventDomainContext,
): void => {
// Append data to the event context here.
},
},
};
export const filter = {
logs: {
enricherName: (event: LogsEvent): boolean => {
// Return true to discard log.
},
},
rum: {
enricherName: (
event: RumEvent,
context: RumEventDomainContext,
): boolean => {
// Return true to discard the log.
},
},
};
- For
Logs
,event
is the captured event object. New log information can be appended to this object. See https://docs.datadoghq.com/logs/log_collection/javascript/#advanced-usage for more information. - For
RUM
, see https://docs.datadoghq.com/real_user_monitoring/guide/enrich-and-control-rum-data/?tab=event for information about theevent
andcontext
properties.
Initialization
<script src="/datadog-initializer.js" type="text/javascript"></script>
<script>
DD_INITIALIZER.init({
applicationId: '<DATADOG_APPLICATION_ID>',
clientToken: '<DATADOG_CLIENT_TOKEN>',
site: '<DATADOG_SITE>',
service: 'my-web-application',
version: '1.0.0',
sampleRate: 100,
environments: {
production: {
host: 'app.prod-domain.com',
tracingOrigin: 'prod-domain.com',
},
test: {
host: /^app\.([0-9]+)\.test-domain\.com$/,
tracingOrigin: '$1.test-domain.com',
},
},
});
</script>
8 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
1 year ago
1 year ago
1 year ago
1 year ago
10 months ago
12 months ago
1 year ago
11 months ago
1 year ago
1 year ago
1 year ago
11 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago