Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use faas.instance instead of faas.id in gcp detector #4198

Merged
merged 7 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Change interceptors in `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` to disable `SENT`/`RECEIVED` events.
Use `WithMessageEvents()` to turn back on. (#3964)

### Changed

- `go.opentelemetry.io/contrib/detectors/gcp`: Detect faas.instance instead of faas.id, since faas.id is being removed. (#4198)
dashpole marked this conversation as resolved.
Show resolved Hide resolved

### Fixed

- AWS XRay Remote Sampling to cap `quotaBalance` to 1x quota in `go.opentelemetry.io/contrib/samplers/aws/xray`. (#3651, #3652)
Expand Down
8 changes: 4 additions & 4 deletions detectors/gcp/detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,27 +60,27 @@ func (d *detector) Detect(ctx context.Context) (*resource.Resource, error) {
b.attrs = append(b.attrs, semconv.CloudPlatformGCPCloudRun)
b.add(semconv.FaaSNameKey, d.detector.FaaSName)
b.add(semconv.FaaSVersionKey, d.detector.FaaSVersion)
b.add(semconv.FaaSIDKey, d.detector.FaaSID)
b.add(semconv.FaaSInstanceKey, d.detector.FaaSID)
b.add(semconv.CloudRegionKey, d.detector.FaaSCloudRegion)
case gcp.CloudFunctions:
b.attrs = append(b.attrs, semconv.CloudPlatformGCPCloudFunctions)
b.add(semconv.FaaSNameKey, d.detector.FaaSName)
b.add(semconv.FaaSVersionKey, d.detector.FaaSVersion)
b.add(semconv.FaaSIDKey, d.detector.FaaSID)
b.add(semconv.FaaSInstanceKey, d.detector.FaaSID)
b.add(semconv.CloudRegionKey, d.detector.FaaSCloudRegion)
case gcp.AppEngineFlex:
b.attrs = append(b.attrs, semconv.CloudPlatformGCPAppEngine)
b.addZoneAndRegion(d.detector.AppEngineFlexAvailabilityZoneAndRegion)
b.add(semconv.FaaSNameKey, d.detector.AppEngineServiceName)
b.add(semconv.FaaSVersionKey, d.detector.AppEngineServiceVersion)
b.add(semconv.FaaSIDKey, d.detector.AppEngineServiceInstance)
b.add(semconv.FaaSInstanceKey, d.detector.AppEngineServiceInstance)
case gcp.AppEngineStandard:
b.attrs = append(b.attrs, semconv.CloudPlatformGCPAppEngine)
b.add(semconv.CloudAvailabilityZoneKey, d.detector.AppEngineStandardAvailabilityZone)
b.add(semconv.CloudRegionKey, d.detector.AppEngineStandardCloudRegion)
b.add(semconv.FaaSNameKey, d.detector.AppEngineServiceName)
b.add(semconv.FaaSVersionKey, d.detector.AppEngineServiceVersion)
b.add(semconv.FaaSIDKey, d.detector.AppEngineServiceInstance)
b.add(semconv.FaaSInstanceKey, d.detector.AppEngineServiceInstance)
case gcp.GCE:
b.attrs = append(b.attrs, semconv.CloudPlatformGCPComputeEngine)
b.addZoneAndRegion(d.detector.GCEAvailabilityZoneAndRegion)
Expand Down
8 changes: 4 additions & 4 deletions detectors/gcp/detector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func TestDetect(t *testing.T) {
semconv.CloudRegion("us-central1"),
semconv.FaaSName("my-service"),
semconv.FaaSVersion("123456"),
semconv.FaaSID("1472385723456792345"),
semconv.FaaSInstance("1472385723456792345"),
),
},
{
Expand All @@ -133,7 +133,7 @@ func TestDetect(t *testing.T) {
semconv.CloudRegion("us-central1"),
semconv.FaaSName("my-service"),
semconv.FaaSVersion("123456"),
semconv.FaaSID("1472385723456792345"),
semconv.FaaSInstance("1472385723456792345"),
),
},
{
Expand All @@ -155,7 +155,7 @@ func TestDetect(t *testing.T) {
semconv.CloudAvailabilityZone("us-central1-c"),
semconv.FaaSName("my-service"),
semconv.FaaSVersion("123456"),
semconv.FaaSID("1472385723456792345"),
semconv.FaaSInstance("1472385723456792345"),
),
},
{
Expand All @@ -177,7 +177,7 @@ func TestDetect(t *testing.T) {
semconv.CloudAvailabilityZone("us-central1-c"),
semconv.FaaSName("my-service"),
semconv.FaaSVersion("123456"),
semconv.FaaSID("1472385723456792345"),
semconv.FaaSInstance("1472385723456792345"),
),
},
{
Expand Down
Loading