diff --git a/packages/opentelemetry-plugin-grpc/src/grpc.ts b/packages/opentelemetry-plugin-grpc/src/grpc.ts index 531bd80bbf6..9c44c65abd4 100644 --- a/packages/opentelemetry-plugin-grpc/src/grpc.ts +++ b/packages/opentelemetry-plugin-grpc/src/grpc.ts @@ -354,9 +354,12 @@ export class GrpcPlugin extends BasePlugin { parent: currentSpan || undefined, }) .setAttribute(AttributeNames.COMPONENT, GrpcPlugin.component); - return plugin._makeGrpcClientRemoteCall(original, args, this, plugin)( - span - ); + return plugin._makeGrpcClientRemoteCall( + original, + args, + this, + plugin + )(span); }; }; } diff --git a/packages/opentelemetry-plugin-http/src/http.ts b/packages/opentelemetry-plugin-http/src/http.ts index 76278b5760c..22c34c62b64 100644 --- a/packages/opentelemetry-plugin-http/src/http.ts +++ b/packages/opentelemetry-plugin-http/src/http.ts @@ -485,7 +485,7 @@ export class HttpPlugin extends BasePlugin { span: Span, execute: T, rethrow: K - ): K extends true ? ReturnType : (ReturnType | void); + ): K extends true ? ReturnType : ReturnType | void; private _safeExecute ReturnType>( span: Span, execute: T, diff --git a/packages/opentelemetry-plugin-http/src/types.ts b/packages/opentelemetry-plugin-http/src/types.ts index 05fe0338630..e55c3583483 100644 --- a/packages/opentelemetry-plugin-http/src/types.ts +++ b/packages/opentelemetry-plugin-http/src/types.ts @@ -39,7 +39,7 @@ export type RequestSignature = [http.RequestOptions, HttpCallbackOptional] & export type HttpRequestArgs = Array; export type ParsedRequestOptions = - | http.RequestOptions & Partial + | (http.RequestOptions & Partial) | http.RequestOptions; export type Http = typeof http; /* tslint:disable-next-line:no-any */ diff --git a/packages/opentelemetry-plugin-http/src/utils.ts b/packages/opentelemetry-plugin-http/src/utils.ts index b1a27b97fd8..f4d5d052e01 100644 --- a/packages/opentelemetry-plugin-http/src/utils.ts +++ b/packages/opentelemetry-plugin-http/src/utils.ts @@ -46,7 +46,7 @@ export const getAbsoluteUrl = ( // it should be displayed if it's not 80 and 443 (default ports) if ( (host as string).indexOf(':') === -1 && - (port && port !== '80' && port !== '443') + port && port !== '80' && port !== '443' ) { host += `:${port}`; } diff --git a/packages/opentelemetry-plugin-postgres/opentelemetry-plugin-pg/src/pg.ts b/packages/opentelemetry-plugin-postgres/opentelemetry-plugin-pg/src/pg.ts index e41ceee08a0..a6841ae33a8 100644 --- a/packages/opentelemetry-plugin-postgres/opentelemetry-plugin-pg/src/pg.ts +++ b/packages/opentelemetry-plugin-postgres/opentelemetry-plugin-pg/src/pg.ts @@ -97,9 +97,10 @@ export class PostgresPlugin extends BasePlugin { const parentSpan = plugin._tracer.getCurrentSpan(); if (typeof args[args.length - 1] === 'function') { // Patch ParameterQuery callback - args[args.length - 1] = utils.patchCallback(span, args[ - args.length - 1 - ] as PostgresCallback); + args[args.length - 1] = utils.patchCallback( + span, + args[args.length - 1] as PostgresCallback + ); // If a parent span exists, bind the callback if (parentSpan) { args[args.length - 1] = plugin._tracer.bind(