An open API service indexing awesome lists of open source software.

https://github.com/oneteme/inspect-ng-collector

inspect angular collector
https://github.com/oneteme/inspect-ng-collector

Last synced: 4 months ago
JSON representation

inspect angular collector

Awesome Lists containing this project

README

          

## Installation [![NPM Version](https://img.shields.io/npm/v/%40oneteme%2Finspect-ng-collector?style=social)](https://www.npmjs.com/package/@oneteme/inspect-ng-collector)
```sh
$ npm i @oneteme/inspect-ng-collector
```

## Integration
Tout d'abord, importer le **NgCollectorModule** dans le module de votre application.

```ts
// .ts
...
import { environment } from 'src/environments/environment';
import { NgCollectorModule } from '@oneteme/inspect-ng-collector';

@NgModule({
declarations: [...],
imports: [
...
NgCollectorModule.forRoot(environment.application),
],
...
})
export class {}
```
## Configuration
La bibliothèque nécessite certaines configurations pour fonctionner correctement. ces configurations doivent être fournies lors de l'initialisation du module.

```ts
// app.module.ts
export const environment = {
...
application: {
host: `https://backend-url.fr`,
name: "",
version: "0.0.0",
env: '',
user: () => '',
instanceApi: 'v3/trace/instance', // instance endpoint
sessionApi: 'v3/trace/instance/:id/session', // sessions endpoint
exclude: [/scope/], // routes to exclude
delay : 60000, // trace frequency
bufferMaxSize: 1000, // maximum number of sessions
debug: false, // enable debug mode
enabled: true
}
};
```

## Référence API

| Request | Description | Valeur par défaut | obligatoire |
|--------------------------------------------------------|--------------|----|----|
| enabled | **boolean** | false | x |
| host | **string** | null | x |
| name | **string\|(()=>string)** | null | x |
| env | **string\|(()=>string)** | null | x|
| instanceApi | **string\|(()=>string)** | null | x |
| sessionApi | **string\|(()=>string)** | null | x |
| exclude | **RegExp[]\|(()=>RegExp[])** | [] | x |
| delay | **number \|(()=>number )** | 60000ms | |
| bufferMaxSize | **number \|(()=>number )** | 1000 | |
| debug | **boolean** | false | |
| version | **string\|(()=>string)** | null | |
| user | **string\|(()=>string)** | null | |