title: [NestJs-Pino]RequestId to be used throughout code
body: <p>Im logging requestId in logs using <a href="https://www.npmjs.com/package/nestjs-pino" rel="nofollow noreferrer">nestjs-pino</a> as per below code:-</p>
  
  <pre><code>import {
    Module,
    HttpModule
  } from '@nestjs/common';
  import { MongooseModule } from '@nestjs/mongoose';
  import { APP_FILTER } from '@nestjs/core';
  import { LoggerModule } from 'nestjs-pino';
  
  import { CorrelationIdGeneratorService } from './services/helpers/generators/correlation-id-generator.service';
  
  
  const correlationIdGeneratorFactory = {
    providers: [
      CorrelationIdGeneratorService,
      UniqueIdGeneratorService
    ],
    inject: [CorrelationIdGeneratorService],
    useFactory: async (correlationIdGeneratorService: CorrelationIdGeneratorService) =&gt; {
      return {
        pinoHttp: {
          genReqId: (request) =&gt; {
            correlationIdGeneratorService.generateCorrelationId(request);
            return correlationIdGeneratorService.getCorrelationId();
          },
          level: config.get('log.LEVEL'),
          useLevelLabels: true,
          base: null,
          timestamp: () =&gt; {
            return `, "time":"${new Date().toISOString()}"`;
          },
        },
      };
    }
  }
  
  @Module({
    imports: [
      LoggerModule.forRootAsync(correlationIdGeneratorFactory)
    ],
    providers: [
      CorrelationIdGeneratorService
    ],
    exports: [
      CorrelationIdGeneratorService
    ]
  })
  export class SharedModule { }
  
  </code></pre>
  
  <p>Now, the issue is i need to pass the requestId generated above in useFactory() function to be used in other class. But, it seems the scope of request id is limited to LoggerModule (nestjs-pino)</p>
  
  <p>Use case:-  I need to add requestId in metaData of a file uploaded which handled by other class.</p>
  
  <p>Any help, is appreciated.</p>