Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit 4bf8ba1

Browse files
committed
Rename TagContext -> TagMap
1 parent 5b9283e commit 4bf8ba1

File tree

1 file changed

+4
-4
lines changed
  • packages/opencensus-instrumentation-http/src

1 file changed

+4
-4
lines changed

packages/opencensus-instrumentation-http/src/http.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,9 @@ export class HttpPlugin extends BasePlugin {
265265

266266
const requestUrl = request.url ? url.parse(request.url) : null;
267267
const host = headers.host || 'localhost';
268-
const userAgent = (headers['user-agent'] ||
269-
headers['User-Agent']) as string;
270-
const tags = HttpPlugin.getTagContext(headers) || new TagMap();
268+
const userAgent =
269+
(headers['user-agent'] || headers['User-Agent']) as string;
270+
const tags = HttpPlugin.getTagMap(headers) || new TagMap();
271271

272272
rootSpan.addAttribute(
273273
HttpPlugin.ATTRIBUTE_HTTP_HOST,
@@ -625,7 +625,7 @@ export class HttpPlugin extends BasePlugin {
625625
* @param headers The incoming HTTP header object from which TagMap should be
626626
* retrieved.
627627
*/
628-
static getTagContext(headers: IncomingHttpHeaders): TagMap|null {
628+
static getTagMap(headers: IncomingHttpHeaders): TagMap|null {
629629
const contextValue = (headers[CORRELATION_CONTEXT.toLocaleLowerCase()] ||
630630
headers[CORRELATION_CONTEXT]) as string;
631631
// Entry doesn't exist.

0 commit comments

Comments
 (0)