nestjs-apm-v4
TypeScript icon, indicating that this package has built-in type declarations

1.0.9 • Public • Published

nestjs-apm-v4

Installation

$ npm i nestjs-apm-v4

NestJs 4 config

main.ts (first line)

import { apm } from 'nestjs-apm-v4';
...
if (apm.isStarted()) {
	console.log('APM running');
}

...
// Register global interceptor
  const apmInterceptor = app
    .select(ApmModule)
    .get(ApmInterceptor);
  app.useGlobalInterceptors(apmInterceptor);

  await app.listen(3000);

app.module.ts

...
import { ApmModule } from 'nestjs-apm-v4';
...
@NgModule({
  ...
  imports: [
    ...,
    ApmModule.register(),
    ...
  ]
})
export class AppModule { }

Env variables

ELASTIC_APM_SERVER_URL=
ELASTIC_APM_LOG_LEVEL=
ELASTIC_APM_SERVICE_NAME=

Dependents (0)

Package Sidebar

Install

npm i nestjs-apm-v4

Weekly Downloads

3

Version

1.0.9

License

MIT

Unpacked Size

114 kB

Total Files

15

Last publish

Collaborators

  • jgcolo