From 2fda929d648e376cc30fc5e0dd8943af83d6db6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carlos=20Ch=C3=A1vez?= Date: Sun, 1 Dec 2019 01:08:14 +0100 Subject: [PATCH] fix(express): fixes typing for express middleware. --- packages/zipkin-instrumentation-express/index.d.ts | 4 ++++ .../zipkin-instrumentation-express/src/expressMiddleware.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/zipkin-instrumentation-express/index.d.ts b/packages/zipkin-instrumentation-express/index.d.ts index f54e9886..b7d27673 100644 --- a/packages/zipkin-instrumentation-express/index.d.ts +++ b/packages/zipkin-instrumentation-express/index.d.ts @@ -11,6 +11,10 @@ import {Tracer} from 'zipkin'; * Note that if the next middleware makes async calls, it should either * store the span id manually or use a CLSContext so that the annotations * go to the correct spans + * + * @param {Object} options + * @property {Tracer} options.tracer + * @property {number} options.port */ export declare function expressMiddleware( options: {tracer: Tracer, port?: number} diff --git a/packages/zipkin-instrumentation-express/src/expressMiddleware.js b/packages/zipkin-instrumentation-express/src/expressMiddleware.js index 9c7c0448..96f75db0 100644 --- a/packages/zipkin-instrumentation-express/src/expressMiddleware.js +++ b/packages/zipkin-instrumentation-express/src/expressMiddleware.js @@ -19,7 +19,7 @@ function formatRequestUrl(req) { /** * @typedef {Object} MiddlewareOptions * @property {Object} tracer - * @property {string} serviceName + * @property {string} serviceName @deprecated use the localEndpoint in Tracer instead * @property {number} port */