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
- Host: GitHub
- URL: https://github.com/oneteme/inspect-ng-collector
- Owner: oneteme
- License: apache-2.0
- Created: 2024-07-01T13:28:49.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2026-04-01T15:29:31.000Z (4 months ago)
- Last Synced: 2026-04-01T16:32:52.600Z (4 months ago)
- Language: TypeScript
- Size: 252 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-angular - inspect-ng-collector - A comprehensive front-end telemetry and monitoring library for Angular applications. (Development Utilities / Analytics)
README
## Installation [](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 | |