Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dyladan committed Nov 10, 2019
1 parent ad2174c commit 9ca65fc
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export class DocumentLoad extends BasePlugin<unknown> {
});
} else {
// // fallback to previous version
const perf: (typeof otperformance) & PerformanceLegacy = otperformance;
const perf: typeof otperformance & PerformanceLegacy = otperformance;
const performanceTiming = perf.timing;
if (performanceTiming) {
const keys = Object.values(PTN);
Expand Down
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
2 changes: 1 addition & 1 deletion packages/opentelemetry-plugin-http/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
}
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 9ca65fc

Please sign in to comment.