Skip to content

Commit

Permalink
add referer to stats struct
Browse files Browse the repository at this point in the history
  • Loading branch information
umputun committed Nov 3, 2019
1 parent f8262b9 commit 995f277
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/server/rlb_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ type LogRecord struct {
FileName string `json:"file_name"`
Service string `json:"service"`
DestHost string `json:"dest"`
Referer string `json:"referer"`
}

// NewRLBServer makes a new rlb server for map of services
Expand Down Expand Up @@ -153,6 +154,7 @@ func (s *RLBServer) submitStats(r *http.Request, node picker.Node, url string) e
FileName: strings.Join(fileNameSplit[1:], "/"),
Service: fileNameSplit[0],
DestHost: strings.TrimPrefix(strings.TrimPrefix(node.Server, "http://"), "https://"),
Referer: r.Referer(),
}
client := http.Client{Timeout: time.Millisecond * 100}

Expand Down

0 comments on commit 995f277

Please sign in to comment.