3.0.6 • Published 2 months ago

@dineroregnskab/datadog-angular v3.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
2 months ago

@dineroregnskab/datadog-angular

Datadog integration for Angular projects.

Has built-in unwrapping of HttpErrorResponse and UncaughtPromiseError.

Enrichers

Included enrichers for Logs and RUM:

  • @ngrx/store

Enrichers for Logs can be imported from: @dineroregnskab/datadog-angular/enrichers/logs
Enrichers for RUM can be imported from: @dineroregnskab/datadog-angular/enrichers/rum

Filters

Included filters for Logs and RUM:

  • Discard HTTP errors with status code 0
  • Discard HTTP errors with 0 Unknown Error message

Filters for Logs can be imported from: @dineroregnskab/datadog-angular/filters/logs
Filters for RUM can be imported from: @dineroregnskab/datadog-angular/filters/rum

Templates:

Enrichers:

Logs:

export const enricher = (log: LogsEvent, injector: Injector | null): void => {
    // Append data to log object.
};

RUM:

export const enricher = (
    event: RumEvent,
    context: RumEventDomainContext,
    injector: Injector | null,
): void => {
    // Append data to the event context here.
};

Filters:

Logs:

export const filter = (
    event: RumEvent,
    context: RumEventDomainContext,
    injector: Injector | null,
): boolean => {
    // Return true to discard the log.
};

RUM:

export const filter = (log: LogsEvent, injector: Injector | null): boolean => {
    // Return true to discard log.
};

Initialization

Initializer will instrument both Logs and RUM.

main.ts

import { setNgInjector } from '@dineroregnskab/datadog-angular';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app';

platformBrowserDynamic()
    .bootstrapModule(AppModule)
    .then((appRef) => {
        // Save a reference to the Angular DI injector for use in logging.
        setNgInjector(appRef.injector);
    })
    .catch((err) => console.error(err));

Error handler

import { ErrorHandler, Injectable } from '@angular/core';
import { DatadogErrorHandler } from '@dineroregnskab/datadog-angular';

@Injectable()
export class CustomErrorHandler
    extends DatadogErrorHandler
    implements ErrorHandler
{
    public constructor() {
        super();
    }

    public handleError(error: any): void {
        this.datadogLogger.error(error);
    }
}
3.0.6

2 months ago

3.0.5

2 months ago

2.7.0

7 months ago

2.7.2

7 months ago

2.7.1

7 months ago

2.7.10

5 months ago

3.0.4

3 months ago

3.0.3

3 months ago

3.0.2

3 months ago

3.0.1

3 months ago

2.7.4

6 months ago

2.7.3

6 months ago

2.7.6

6 months ago

2.7.5

6 months ago

3.0.0

3 months ago

2.7.8

5 months ago

2.7.7

6 months ago

2.7.9

5 months ago

2.6.1

8 months ago

2.6.0

9 months ago

2.5.0

10 months ago

2.4.0

10 months ago

2.3.0

11 months ago

2.2.1

11 months ago

2.2.0

11 months ago

2.2.3

11 months ago

2.2.2

11 months ago

2.2.5

11 months ago

2.2.4

11 months ago

2.2.7

11 months ago

2.2.6

11 months ago

2.1.1

12 months ago

2.1.0

12 months ago

2.0.2

1 year ago

2.0.1

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

2.0.0

1 year ago

1.3.1

1 year ago

1.3.0

2 years ago

1.2.4

2 years 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

0.9.0

3 years ago

0.9.2

3 years ago

0.9.1

3 years ago

1.1.1

3 years ago

1.1.0

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.0.0

3 years ago

0.8.4

3 years ago

0.7.2

3 years ago

0.7.1

3 years ago

0.7.4

3 years ago

0.7.3

3 years ago

0.7.6

3 years ago

0.7.5

3 years ago

0.8.1

3 years ago

0.8.0

3 years ago

0.8.3

3 years ago

0.8.2

3 years ago

0.7.0

3 years ago

0.6.0

3 years ago

0.5.8

3 years ago

0.5.7

3 years ago

0.5.6

3 years ago

0.5.5

3 years ago

0.5.4

3 years ago

0.5.3

3 years ago

0.5.2

3 years ago

0.5.1

3 years ago

0.5.0

3 years ago

0.4.2

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.7

3 years ago

0.3.6

3 years ago

0.3.5

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago

0.1.38

3 years ago

0.1.37

3 years ago

0.1.36

3 years ago

0.1.35

3 years ago

0.1.34

3 years ago

0.1.33

3 years ago

0.1.32

3 years ago

0.1.31

3 years ago

0.1.29

3 years ago

0.1.28

3 years ago

0.1.27

3 years ago

0.1.26

3 years ago

0.1.25

3 years ago

0.1.24

3 years ago

0.1.23

3 years ago

0.1.22

3 years ago

0.1.21

3 years ago

0.1.20

3 years ago

0.1.19

3 years ago

0.1.18

3 years ago

0.1.17

3 years ago

0.1.16

3 years ago

0.1.15

3 years ago

0.1.14

3 years ago

0.1.13

3 years ago

0.1.12

3 years ago

0.1.11

3 years ago

0.1.10

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago