Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dyladan committed Nov 9, 2019
1 parent b01c540 commit 42ddb88
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
9 changes: 6 additions & 3 deletions packages/opentelemetry-plugin-grpc/src/grpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,12 @@ export class GrpcPlugin extends BasePlugin<grpc> {
parent: currentSpan || undefined,
})
.setAttribute(AttributeNames.COMPONENT, GrpcPlugin.component);
return plugin._makeGrpcClientRemoteCall(original, args, this, plugin)(
span
);
return plugin._makeGrpcClientRemoteCall(
original,
args,
this,
plugin
)(span);
};
};
}
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-plugin-http/src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ export class HttpPlugin extends BasePlugin<Http> {
span: Span,
execute: T,
rethrow: K
): K extends true ? ReturnType<T> : (ReturnType<T> | void);
): K extends true ? ReturnType<T> : ReturnType<T> | void;
private _safeExecute<T extends (...args: unknown[]) => ReturnType<T>>(
span: Span,
execute: T,
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-plugin-http/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export type RequestSignature = [http.RequestOptions, HttpCallbackOptional] &
export type HttpRequestArgs = Array<HttpCallbackOptional | RequestSignature>;

export type ParsedRequestOptions =
| http.RequestOptions & Partial<url.UrlWithParsedQuery>
| (http.RequestOptions & Partial<url.UrlWithParsedQuery>)
| http.RequestOptions;
export type Http = typeof http;
/* tslint:disable-next-line:no-any */
Expand Down
4 changes: 3 additions & 1 deletion packages/opentelemetry-plugin-http/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ 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}`;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ export class PostgresPlugin extends BasePlugin<typeof pgTypes> {
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(
Expand Down

0 comments on commit 42ddb88

Please sign in to comment.