Skip to content

Commit ed528a6

Browse files
authored
improv(tracer): remove require in tracer provider (#2557)
1 parent fe974e1 commit ed528a6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/tracer/src/provider/ProviderService.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ import {
2929
isHttpSubsegment,
3030
} from './utilities.js';
3131
import type { DiagnosticsChannel } from 'undici-types';
32+
import http from 'node:http';
33+
import https from 'node:https';
3234

3335
class ProviderService implements ProviderServiceInterface {
3436
/**
@@ -70,10 +72,8 @@ class ProviderService implements ProviderServiceInterface {
7072
}
7173

7274
public captureHTTPsGlobal(): void {
73-
// eslint-disable-next-line @typescript-eslint/no-var-requires
74-
captureHTTPsGlobal(require('http'));
75-
// eslint-disable-next-line @typescript-eslint/no-var-requires
76-
captureHTTPsGlobal(require('https'));
75+
captureHTTPsGlobal(http);
76+
captureHTTPsGlobal(https);
7777
}
7878

7979
public getNamespace(): Namespace {

0 commit comments

Comments
 (0)