Skip to content

Commit a3773ef

Browse files
committed
Drop ServicesExtensions constructor for an inline map initializer
1 parent d97009f commit a3773ef

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

packages/server-utils/src/integrations/tracing-channel/aws-sdk/services/ServicesExtensions.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@ import type { NormalizedRequest, NormalizedResponse, RequestMetadata } from '../
33
import type { ServiceExtension } from './ServiceExtension';
44

55
export class ServicesExtensions implements ServiceExtension {
6-
private _services: Map<string, ServiceExtension>;
7-
8-
public constructor() {
9-
// Per-service extensions, keyed by the client's `serviceId` (e.g. `'S3'`). Services without a
10-
// registered extension still get the base rpc span from the subscriber.
11-
this._services = new Map();
12-
}
6+
// Per-service extensions, keyed by the client's `serviceId` (e.g. `'S3'`). Services without a
7+
// registered extension still get the base rpc span from the subscriber.
8+
private _services: Map<string, ServiceExtension> = new Map();
139

1410
public requestPreSpanHook(request: NormalizedRequest): RequestMetadata {
1511
const serviceExtension = this._services.get(request.serviceName);

0 commit comments

Comments
 (0)