Skip to content

Commit 73ba153

Browse files
committed
remove host.name from GKE, since GKE doesn't support it
1 parent 5c3e949 commit 73ba153

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

detectors/gcp/detector.go

-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ func (d *detector) Detect(ctx context.Context) (*resource.Resource, error) {
5656
b.addZoneOrRegion(d.detector.GKEAvailabilityZoneOrRegion)
5757
b.add(semconv.K8SClusterNameKey, d.detector.GKEClusterName)
5858
b.add(semconv.HostIDKey, d.detector.GKEHostID)
59-
b.add(semconv.HostNameKey, d.detector.GKEHostName)
6059
case gcp.CloudRun:
6160
b.attrs = append(b.attrs, semconv.CloudPlatformGCPCloudRun)
6261
b.add(semconv.FaaSNameKey, d.detector.FaaSName)

detectors/gcp/detector_test.go

-4
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ func TestDetect(t *testing.T) {
4444
projectID: "my-project",
4545
cloudPlatform: gcp.GKE,
4646
gkeHostID: "1472385723456792345",
47-
gkeHostName: "my-gke-node-1234",
4847
gkeClusterName: "my-cluster",
4948
gkeAvailabilityZone: "us-central1-c",
5049
}},
@@ -55,7 +54,6 @@ func TestDetect(t *testing.T) {
5554
semconv.K8SClusterNameKey.String("my-cluster"),
5655
semconv.CloudAvailabilityZoneKey.String("us-central1-c"),
5756
semconv.HostIDKey.String("1472385723456792345"),
58-
semconv.HostNameKey.String("my-gke-node-1234"),
5957
),
6058
},
6159
{
@@ -64,7 +62,6 @@ func TestDetect(t *testing.T) {
6462
projectID: "my-project",
6563
cloudPlatform: gcp.GKE,
6664
gkeHostID: "1472385723456792345",
67-
gkeHostName: "my-gke-node-1234",
6865
gkeClusterName: "my-cluster",
6966
gkeRegion: "us-central1",
7067
}},
@@ -75,7 +72,6 @@ func TestDetect(t *testing.T) {
7572
semconv.K8SClusterNameKey.String("my-cluster"),
7673
semconv.CloudRegionKey.String("us-central1"),
7774
semconv.HostIDKey.String("1472385723456792345"),
78-
semconv.HostNameKey.String("my-gke-node-1234"),
7975
),
8076
},
8177
{

0 commit comments

Comments
 (0)