Collect the hostname of the machine as a metric.

The hostname is collected during a build to determine where the user
is build from (from office workstation, cloudtop, etc...). This is a
useful metrics for RBE related builds.

Bug: b/169395325
Test: m nothing, ran printproto to verify that soong_metrics has the
      hostname.
Change-Id: I3e5d64f948ae43c5dda60de1d4a52b187e36dff8
Merged-In: I3e5d64f948ae43c5dda60de1d4a52b187e36dff8
Merged-In: Ib6898b49c16a830d814efe74581bde463caedf76
diff --git a/ui/metrics/metrics.go b/ui/metrics/metrics.go
index 9929b9e..1d7e00b 100644
--- a/ui/metrics/metrics.go
+++ b/ui/metrics/metrics.go
@@ -141,7 +141,12 @@
 }
 
 // exports the output to the file at outputPath
-func (m *Metrics) Dump(outputPath string) (err error) {
+func (m *Metrics) Dump(outputPath string) error {
+	// ignore the error if the hostname could not be retrieved as it
+	// is not a critical metric to extract.
+	if hostname, err := os.Hostname(); err == nil {
+		m.metrics.Hostname = proto.String(hostname)
+	}
 	m.metrics.HostOs = proto.String(runtime.GOOS)
 	data, err := m.Serialize()
 	if err != nil {
diff --git a/ui/metrics/metrics_proto/metrics.pb.go b/ui/metrics/metrics_proto/metrics.pb.go
index 7f7024f..ccc903b 100644
--- a/ui/metrics/metrics_proto/metrics.pb.go
+++ b/ui/metrics/metrics_proto/metrics.pb.go
@@ -195,11 +195,13 @@
 	// The metrics for calling Soong.
 	SoongRuns []*PerfInfo `protobuf:"bytes,19,rep,name=soong_runs,json=soongRuns" json:"soong_runs,omitempty"`
 	// The metrics for calling Ninja.
-	NinjaRuns            []*PerfInfo  `protobuf:"bytes,20,rep,name=ninja_runs,json=ninjaRuns" json:"ninja_runs,omitempty"`
-	BuildConfig          *BuildConfig `protobuf:"bytes,23,opt,name=build_config,json=buildConfig" json:"build_config,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
-	XXX_unrecognized     []byte       `json:"-"`
-	XXX_sizecache        int32        `json:"-"`
+	NinjaRuns   []*PerfInfo  `protobuf:"bytes,20,rep,name=ninja_runs,json=ninjaRuns" json:"ninja_runs,omitempty"`
+	BuildConfig *BuildConfig `protobuf:"bytes,23,opt,name=build_config,json=buildConfig" json:"build_config,omitempty"`
+	// The hostname of the machine.
+	Hostname             *string  `protobuf:"bytes,24,opt,name=hostname" json:"hostname,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
 }
 
 func (m *MetricsBase) Reset()         { *m = MetricsBase{} }
@@ -379,6 +381,13 @@
 	return nil
 }
 
+func (m *MetricsBase) GetHostname() string {
+	if m != nil && m.Hostname != nil {
+		return *m.Hostname
+	}
+	return ""
+}
+
 type BuildConfig struct {
 	UseGoma              *bool    `protobuf:"varint,1,opt,name=use_goma,json=useGoma" json:"use_goma,omitempty"`
 	UseRbe               *bool    `protobuf:"varint,2,opt,name=use_rbe,json=useRbe" json:"use_rbe,omitempty"`
@@ -585,59 +594,60 @@
 func init() { proto.RegisterFile("metrics.proto", fileDescriptor_6039342a2ba47b72) }
 
 var fileDescriptor_6039342a2ba47b72 = []byte{
-	// 860 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xdd, 0x6e, 0xe2, 0x46,
-	0x14, 0x5e, 0x02, 0x1b, 0xec, 0x63, 0x60, 0x9d, 0x49, 0xa4, 0x78, 0x5b, 0xad, 0x16, 0xa1, 0xfe,
-	0x50, 0xa9, 0xa5, 0x2b, 0x14, 0xa1, 0x28, 0x6a, 0x2f, 0x80, 0xa0, 0x2c, 0xda, 0x05, 0x56, 0x03,
-	0xa4, 0xdb, 0x5e, 0xd4, 0x72, 0xec, 0x81, 0xb8, 0xc5, 0x1e, 0x34, 0x33, 0x5e, 0x35, 0x0f, 0xd1,
-	0x27, 0xea, 0xc3, 0xf4, 0x55, 0xaa, 0x39, 0x83, 0x89, 0x93, 0x8b, 0x54, 0x7b, 0x37, 0x3e, 0xd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a2,
-	0xc4, 0x95, 0xd6, 0x69, 0x2d, 0xcd, 0x92, 0xd9, 0xca, 0xcc, 0x27, 0x5b, 0x3f, 0x82, 0x53, 0x98,
-	0xeb, 0xe1, 0x71, 0xdb, 0xf0, 0x7c, 0x3e, 0x9b, 0x4d, 0xf5, 0xbd, 0xb0, 0xa0, 0x32, 0xe9, 0xbf,
-	0x1b, 0xb9, 0x07, 0x83, 0xa3, 0xb7, 0xe5, 0xdf, 0xf2, 0x5f, 0x97, 0x8f, 0xbf, 0xae, 0xff, 0x02,
-	0x00, 0x00, 0xff, 0xff, 0x44, 0x56, 0xd0, 0xb0, 0xca, 0x06, 0x00, 0x00,
+	// 871 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xdd, 0x6e, 0xdb, 0x36,
+	0x14, 0xae, 0x63, 0x27, 0x96, 0x8e, 0x62, 0x57, 0x61, 0x02, 0x44, 0xed, 0x50, 0xd4, 0x30, 0xf6,
+	0xe3, 0x01, 0x9b, 0x57, 0x18, 0x81, 0x11, 0x04, 0xdb, 0x85, 0xed, 0x18, 0xa9, 0xd1, 0xda, 0x2e,
+	0x68, 0x3b, 0xeb, 0x76, 0x31, 0x41, 0x91, 0x68, 0x47, 0x9b, 0x25, 0x1a, 0x24, 0x55, 0x2c, 0x0f,
+	0xb1, 0xe7, 0xdb, 0xe5, 0x5e, 0x65, 0xe0, 0xa1, 0xe5, 0x28, 0xb9, 0x48, 0xd1, 0x3b, 0xf2, 0x7c,
+	0x3f, 0xfc, 0x48, 0x91, 0x47, 0x50, 0x4b, 0x98, 0x12, 0x71, 0x28, 0xdb, 0x1b, 0xc1, 0x15, 0x27,
+	0xb5, 0x9b, 0x2c, 0x5e, 0x47, 0xfe, 0xb6, 0xd8, 0xfc, 0xd7, 0x06, 0x67, 0x6c, 0xc6, 0xfd, 0x40,
+	0x32, 0xf2, 0x06, 0x4e, 0x0c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 0x85, 0x05, 0x95, 0x71, 0xef, 0xdd, 0xd0, 0xdd, 0xeb, 0x1f,
+	0xbd, 0x2d, 0xff, 0x9e, 0xff, 0xd6, 0x7c, 0xfc, 0xad, 0xfd, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x66,
+	0x62, 0xba, 0xc0, 0xe6, 0x06, 0x00, 0x00,
 }
diff --git a/ui/metrics/metrics_proto/metrics.proto b/ui/metrics/metrics_proto/metrics.proto
index adecaf3..5d26b67 100644
--- a/ui/metrics/metrics_proto/metrics.proto
+++ b/ui/metrics/metrics_proto/metrics.proto
@@ -93,6 +93,9 @@
   repeated PerfInfo ninja_runs = 20;
 
   optional BuildConfig build_config = 23;
+
+  // The hostname of the machine.
+  optional string hostname = 24;
 }
 
 message BuildConfig {