From bbe81137ba9fb1622518ec3ea29370d13752e0b4 Mon Sep 17 00:00:00 2001 From: Haru Date: Wed, 30 Aug 2023 23:12:33 +0900 Subject: [PATCH 1/2] remove "aws" from issue template for gcp detector (#4260) --- .github/ISSUE_TEMPLATE/bug_report_detector_gcp.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report_detector_gcp.md b/.github/ISSUE_TEMPLATE/bug_report_detector_gcp.md index ae575216427..1e4ee763004 100644 --- a/.github/ISSUE_TEMPLATE/bug_report_detector_gcp.md +++ b/.github/ISSUE_TEMPLATE/bug_report_detector_gcp.md @@ -1,8 +1,8 @@ --- -name: '[detector: aws:gcp] Bug report' +name: '[detector: gcp] Bug report' about: Create a report of invalid behavior about the gcp package to help us improve title: '' -labels: 'bug, area: detector, detector: aws:gcp' +labels: 'bug, area: detector, detector: gcp' --- From 84de4d2ad279ba99e25a858b38ac5aca78f07801 Mon Sep 17 00:00:00 2001 From: David Ashpole Date: Wed, 30 Aug 2023 10:40:55 -0400 Subject: [PATCH 2/2] fix deprecation notices in GCP detector (#4257) Co-authored-by: Tyler Yahn --- detectors/gcp/cloud-function.go | 1 + detectors/gcp/cloud-run.go | 2 ++ detectors/gcp/gce.go | 1 + detectors/gcp/gke.go | 1 + 4 files changed, 5 insertions(+) diff --git a/detectors/gcp/cloud-function.go b/detectors/gcp/cloud-function.go index 8aea2f00113..4de94546ae3 100644 --- a/detectors/gcp/cloud-function.go +++ b/detectors/gcp/cloud-function.go @@ -28,6 +28,7 @@ const ( ) // NewCloudFunction will return a GCP Cloud Function resource detector. +// // Deprecated: Use gcp.NewDetector() instead, which sets the same resource attributes. func NewCloudFunction() resource.Detector { return &cloudFunction{ diff --git a/detectors/gcp/cloud-run.go b/detectors/gcp/cloud-run.go index 9fc32ca0d5f..f5be2062e3d 100644 --- a/detectors/gcp/cloud-run.go +++ b/detectors/gcp/cloud-run.go @@ -38,6 +38,7 @@ type metadataClient interface { } // CloudRun collects resource information of Cloud Run instance. +// // Deprecated: Use gcp.NewDetector() instead. Note that it sets faas.* resource attributes instead of service.* attributes. type CloudRun struct { mc metadataClient @@ -50,6 +51,7 @@ type CloudRun struct { var _ resource.Detector = (*CloudRun)(nil) // NewCloudRun creates a CloudRun detector. +// // Deprecated: Use gcp.NewDetector() instead. Note that it sets faas.* resource attributes instead of service.* attributes. func NewCloudRun() *CloudRun { return &CloudRun{ diff --git a/detectors/gcp/gce.go b/detectors/gcp/gce.go index 5b4c0ba5efe..905b19211ec 100644 --- a/detectors/gcp/gce.go +++ b/detectors/gcp/gce.go @@ -28,6 +28,7 @@ import ( ) // GCE collects resource information of GCE computing instances. +// // Deprecated: Use gcp.NewDetector() instead, which sets the same resource attributes on GCE. type GCE struct{} diff --git a/detectors/gcp/gke.go b/detectors/gcp/gke.go index 54a1f8604c7..e7baad6f6c1 100644 --- a/detectors/gcp/gke.go +++ b/detectors/gcp/gke.go @@ -27,6 +27,7 @@ import ( ) // GKE collects resource information of GKE computing instances. +// // Deprecated: Use gcp.NewDetector() instead, which does NOT detect container, pod, and namespace attributes. // Set those using name using the OTEL_RESOURCE_ATTRIBUTES env var instead. type GKE struct{}