-
Notifications
You must be signed in to change notification settings - Fork 97
Use options.host instead of options.hostname (#416) #417
Conversation
@@ -377,8 +377,8 @@ export class HttpPlugin extends BasePlugin { | |||
const tags = new TagMap(); | |||
tags.set(stats.HTTP_CLIENT_METHOD, {value: method}); | |||
|
|||
if (options.hostname) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think hostname
is preferred over host
. I would suggest to add below line.
const host = options.hostname || options.host || 'localhost';
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const host = options.hostname || options.host || 'localhost';
span.addAttribute(HttpPlugin.ATTRIBUTE_HTTP_HOST, host);
This change will also fix failing build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I amended the change because it seems like this repository uses rebase policy.
I force pushed to squash it to single commit. Is this correct? I heard this is what you do at google.
@@ -377,8 +377,8 @@ export class HttpPlugin extends BasePlugin { | |||
const tags = new TagMap(); | |||
tags.set(stats.HTTP_CLIENT_METHOD, {value: method}); | |||
|
|||
if (options.hostname) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
Codecov Report
@@ Coverage Diff @@
## master #417 +/- ##
=========================================
+ Coverage 94.79% 94.8% +<.01%
=========================================
Files 136 136
Lines 8999 8997 -2
Branches 665 663 -2
=========================================
- Hits 8531 8530 -1
+ Misses 468 467 -1
Continue to review full report at Codecov.
|
Fixes #416