nestjs-otel
Version:
NestJS OpenTelemetry Library
39 lines (38 loc) • 1.62 kB
TypeScript
/** biome-ignore-all lint/style/useImportType: backward compatibility */
import { DynamicModule, OnApplicationBootstrap } from "@nestjs/common";
import { OpenTelemetryModuleAsyncOptions, OpenTelemetryModuleOptions } from "./interfaces";
/**
* The internal OpenTelemetry Module which handles the integration
* with the third party OpenTelemetry library and Nest
*
* @internal
*/
export declare class OpenTelemetryCoreModule implements OnApplicationBootstrap {
private readonly options;
constructor(options?: OpenTelemetryModuleOptions);
/**
* Bootstraps the internal OpenTelemetry Module with the given options
* synchronously and sets the correct providers
* @param options The options to bootstrap the module synchronously
*/
static forRoot(options?: OpenTelemetryModuleOptions): DynamicModule;
/**
* Bootstraps the internal OpenTelemetry Module with the given
* options asynchronously and sets the correct providers
* @param options The options to bootstrap the module
*/
static forRootAsync(options: OpenTelemetryModuleAsyncOptions): DynamicModule;
onApplicationBootstrap(): Promise<void>;
/**
* Returns the asynchrnous OpenTelemetry options providers depending on the
* given module options
* @param options Options for the asynchrnous OpenTelemetry module
*/
private static createAsyncOptionsProvider;
/**
* Returns the asynchrnous providers depending on the given module
* options
* @param options Options for the asynchrnous OpenTelemetry module
*/
private static createAsyncProviders;
}