Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
revert: default config in constructor to empty object
  • Loading branch information
blumamir committed Apr 25, 2024
commit e64f9f8e94d83a29fea6c1e9705193826fb86367
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class FetchInstrumentation extends InstrumentationBase<FetchInstrumentati
private _usedResources = new WeakSet<PerformanceResourceTiming>();
private _tasksCount = 0;

constructor(config: FetchInstrumentationConfig = {}) {
constructor(config?: FetchInstrumentationConfig) {
super('@opentelemetry/instrumentation-fetch', VERSION, config);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export abstract class InstrumentationBase<
constructor(
instrumentationName: string,
instrumentationVersion: string,
config: ConfigType
config: ConfigType = {} as ConfigType // The cast here may be wrong as ConfigType may contain required fields
) {
super(instrumentationName, instrumentationVersion, config);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export abstract class InstrumentationBase<
constructor(
instrumentationName: string,
instrumentationVersion: string,
config: ConfigType
config: ConfigType = {} as ConfigType // The cast here may be wrong as ConfigType may contain required fields
) {
super(instrumentationName, instrumentationVersion, config);

Expand Down