Skip to content

Commit

Permalink
Merge pull request #3085 from influxdata/zipkin-span-hostname-fix
Browse files Browse the repository at this point in the history
Change default hostname value when no endpoint is provided in zipkin plugin
  • Loading branch information
goller committed Aug 2, 2017
2 parents b1ec4bd + c03e54d commit 355c65e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/inputs/zipkin/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func ipv4(addr int32) string {

func host(h *zipkincore.Endpoint) string {
if h == nil {
return ""
return ipv4(int32(0))
}
if h.GetPort() == 0 {
return ipv4(h.GetIpv4())
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/zipkin/convert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ func Test_host(t *testing.T) {
args: args{
h: nil,
},
want: "",
want: "0.0.0.0",
},
{
name: "int overflow zipkin uses an int16 type as an unsigned int 16.",
Expand Down

0 comments on commit 355c65e

Please sign in to comment.