Skip to content

gcp-resources: populate cloud.resource_id on Cloud Run and Cloud Functions - #3229

Merged
jaydeluca merged 1 commit into
open-telemetry:mainfrom
dashpole:gcp-cloud-resource-id
Nov 19, 2026
Merged

jaydeluca merged 1 commit into
open-telemetry:mainfrom
dashpole:gcp-cloud-resource-id

Conversation

@dashpole

Copy link
Copy Markdown
Contributor

Description:

Populate the incubating cloud.resource_id resource attribute in gcp-resources for Google Cloud Run services, Cloud Run jobs, and Cloud Functions:

  • Cloud Run Service: //run.googleapis.com/projects/<cloud.account.id>/locations/<cloud.region>/services/<faas.name>
  • Cloud Run Job: //run.googleapis.com/projects/<cloud.account.id>/locations/<cloud.region>/jobs/<faas.name>
  • Cloud Functions: //cloudfunctions.googleapis.com/projects/<cloud.account.id>/locations/<cloud.region>/functions/<faas.name>

cloud.resource_id is emitted only when projectId, cloud.region, and faas.name are all non-null and non-empty, and is omitted on GCE, GKE, and App Engine. This matches the behavior recently added in open-telemetry/opentelemetry-go-contrib#10258.

Existing Issue(s):

None in this repository (cross-language parity with open-telemetry/opentelemetry-go-contrib#10258).

Testing:

  • Ran ./gradlew :gcp-resources:spotlessCheck :gcp-resources:check --rerun-tasks --console=plain (65 tests across GCPResourceProviderTest, GcpMetadataConfigTest, GcpPlatformDetectorTest, and ResourceComponentProviderTest: 0 failures, 0 errors, 0 skipped; Spotless, ErrorProne, and NullAway checks passed).
  • Updated GCPResourceProviderTest assertions for Cloud Run Service, Cloud Run Job, Cloud Functions, GCE, GKE, and App Engine, and added parameterized missing/empty component tests across all three serverless platforms.

Documentation:

Updated gcp-resources/README.md to document cloud.resource_id detection for Cloud Run and Cloud Functions.

Outstanding items:

None.

…tions

Populate the incubating cloud.resource_id resource attribute for Cloud Run services, Cloud Run jobs, and Cloud Functions when project ID, region, and service/job/function name are all non-empty.
@github-actions
github-actions Bot requested review from jsuereth and psx95 November 17, 2026 20:38
@dashpole
dashpole requested a balanced review from Copilot November 17, 2026 20:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@breedx-splk breedx-splk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@laurit

laurit commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T07:08:41.561749Z f2164f7 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: f2164f7c9b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jaydeluca
jaydeluca added this pull request to the merge queue Nov 19, 2026
Merged via the queue into open-telemetry:main with commit 8e76e67 Nov 19, 2026
40 of 43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants