From 4bf8ba16ca7715c1c1611d67daacf0c018e8d0bc Mon Sep 17 00:00:00 2001 From: Mayur Kale Date: Fri, 31 May 2019 10:38:52 -0700 Subject: [PATCH] Rename TagContext -> TagMap --- packages/opencensus-instrumentation-http/src/http.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/opencensus-instrumentation-http/src/http.ts b/packages/opencensus-instrumentation-http/src/http.ts index 367b51c0b..6d6244adb 100644 --- a/packages/opencensus-instrumentation-http/src/http.ts +++ b/packages/opencensus-instrumentation-http/src/http.ts @@ -265,9 +265,9 @@ export class HttpPlugin extends BasePlugin { const requestUrl = request.url ? url.parse(request.url) : null; const host = headers.host || 'localhost'; - const userAgent = (headers['user-agent'] || - headers['User-Agent']) as string; - const tags = HttpPlugin.getTagContext(headers) || new TagMap(); + const userAgent = + (headers['user-agent'] || headers['User-Agent']) as string; + const tags = HttpPlugin.getTagMap(headers) || new TagMap(); rootSpan.addAttribute( HttpPlugin.ATTRIBUTE_HTTP_HOST, @@ -625,7 +625,7 @@ export class HttpPlugin extends BasePlugin { * @param headers The incoming HTTP header object from which TagMap should be * retrieved. */ - static getTagContext(headers: IncomingHttpHeaders): TagMap|null { + static getTagMap(headers: IncomingHttpHeaders): TagMap|null { const contextValue = (headers[CORRELATION_CONTEXT.toLocaleLowerCase()] || headers[CORRELATION_CONTEXT]) as string; // Entry doesn't exist.