Maybe you could so a simple test with just Golang on your machine. I can't come up with a reason why beat.hostname == localhost.
macbook13:tmp akroh$ go version
go version go1.6.2 darwin/amd64
macbook13:tmp akroh$ sysctl kern.hostname
kern.hostname: macbook13.company.com
macbook13:tmp akroh$ cat main.go
package main
import (
"fmt"
"os"
)
func main() {
fmt.Println(os.Hostname())
}
macbook13:tmp akroh$ go run main.go
macbook13.company.com <nil>
As you can see on this line the publisher.hostname is being set to the value of os.Hostname().