Skip to content

Commit

Permalink
fix deprecation notices in GCP detector (#4257)
Browse files Browse the repository at this point in the history
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
  • Loading branch information
dashpole and MrAlias committed Aug 30, 2023
1 parent bbe8113 commit 84de4d2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions detectors/gcp/cloud-function.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 2 additions & 0 deletions detectors/gcp/cloud-run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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{
Expand Down
1 change: 1 addition & 0 deletions detectors/gcp/gce.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}

Expand Down
1 change: 1 addition & 0 deletions detectors/gcp/gke.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand Down

0 comments on commit 84de4d2

Please sign in to comment.