2.6.1 • Published 4 days ago

@dineroregnskab/datadog-initializer v2.6.1

Weekly downloads
-
License
ISC
Repository
-
Last release
4 days ago

@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.
        },
    },
};

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>
2.6.1

4 days ago

2.6.0

2 months ago

2.5.0

2 months ago

2.4.0

3 months ago

2.3.0

4 months ago

2.2.1

4 months ago

2.2.0

4 months ago

2.2.3

4 months ago

2.2.2

4 months ago

2.2.5

4 months ago

2.2.4

4 months ago

2.2.7

4 months ago

2.2.6

4 months ago

2.1.1

4 months ago

2.1.0

4 months ago

2.0.2

5 months ago

2.0.1

5 months ago

1.4.1

6 months ago

1.4.0

8 months ago

1.3.1

8 months ago

2.0.0

6 months ago

1.3.0

12 months ago

1.2.4

1 year ago

1.2.0

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

0.9.2

2 years ago

0.9.1

2 years ago

0.9.0

2 years ago