3.0.6 • Published 8 months ago

@dineroregnskab/datadog-initializer v3.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months 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>
3.0.6

8 months ago

3.0.5

9 months ago

3.0.4

10 months ago

3.0.3

10 months ago

3.0.2

10 months ago

3.0.1

10 months ago

2.7.4

1 year ago

2.7.3

1 year ago

2.7.6

1 year ago

2.7.5

1 year ago

3.0.0

10 months ago

2.7.8

12 months ago

2.7.7

1 year ago

2.7.9

11 months ago

2.7.0

1 year ago

2.7.2

1 year ago

2.7.1

1 year ago

2.7.10

11 months ago

2.6.1

1 year ago

2.6.0

1 year ago

2.5.0

1 year ago

2.4.0

1 year ago

2.3.0

1 year ago

2.2.1

1 year ago

2.2.0

1 year ago

2.2.3

1 year ago

2.2.2

1 year ago

2.2.5

1 year ago

2.2.4

1 year ago

2.2.7

1 year ago

2.2.6

1 year ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.1

2 years ago

2.0.0

2 years ago

1.3.0

2 years ago

1.2.4

3 years ago

1.2.0

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

0.9.2

3 years ago

0.9.1

3 years ago

0.9.0

3 years ago