app: remove @nestjs/observe
This commit is contained in:
1 parent
b1e3b43c70
commit
cac80fe476
3 files changed
+3
-18
No files matched your search
@@ -24,7 +24,6 @@
|
||||
"dependencies": {
|
||||
"@nestjs/common": "^12.0.1",
|
||||
"@nestjs/core": "^12.0.1",
|
||||
"@nestjs/observe": "^0.3.0",
|
||||
"@nestjs/platform-express": "^12.0.1",
|
||||
"reflect-metadata": "^0.2.2",
|
||||
"rxjs": "^7.8.1"
|
||||
|
||||
+1
-13
@@ -1,21 +1,9 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { createObserveModule } from '@nestjs/observe';
|
||||
import { AppController } from './app.controller.js';
|
||||
import { AppService } from './app.service.js';
|
||||
|
||||
export const { ObserveModule, ObserveInstrument } = createObserveModule();
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
// Distributed tracing, auto-correlated logs, request/job metrics, error
|
||||
// telemetry, alarms, and more — out of the box. Sign up at https://observe.nestjs.com,
|
||||
// then run `npx @nestjs/observe link` to write your key pair into .env.
|
||||
ObserveModule.forRoot({
|
||||
appKey: process.env.OBSERVE_APP_KEY ?? 'YOUR_APP_KEY',
|
||||
appSecret: process.env.OBSERVE_APP_SECRET ?? 'YOUR_APP_SECRET',
|
||||
serviceId: 'it-smi',
|
||||
}),
|
||||
],
|
||||
imports: [],
|
||||
controllers: [AppController],
|
||||
providers: [AppService],
|
||||
})
|
||||
|
||||
+2
-4
@@ -1,10 +1,8 @@
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import { AppModule, ObserveInstrument } from './app.module.js';
|
||||
import { AppModule } from './app.module.js';
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule, {
|
||||
instrument: ObserveInstrument,
|
||||
});
|
||||
const app = await NestFactory.create(AppModule);
|
||||
await app.listen(process.env.PORT ?? 3000);
|
||||
}
|
||||
await bootstrap();
|
||||
Reference in new issue
Block a user