TracerOptions: {
    captureHTTPsRequests?: boolean;
    customConfigService?: ConfigServiceInterface;
    enabled?: boolean;
    serviceName?: string;
}

Options for the tracer class to be used during initialization.

Usage:

Type declaration

  • OptionalcaptureHTTPsRequests?: boolean

    Whether to trace outgoing HTTP requests made with the http, https, or fetch modules

  • OptionalcustomConfigService?: ConfigServiceInterface
  • Optionalenabled?: boolean
  • OptionalserviceName?: string
const customConfigService: ConfigServiceInterface;
const tracerOptions: TracerOptions = {
enabled?: true,
serviceName?: 'serverlessAirline',
captureHTTPsRequests?: true,
customConfigService?: customConfigService, // Only needed for advanced uses
};

const tracer = new Tracer(tracerOptions);