Skip to content

opentelemetry-resourcedetector-gcp: populate cloud.resource_id and detect Cloud Run Jobs - #5352

Merged
aabmass merged 2 commits into
open-telemetry:mainfrom
dashpole:gcp-cloud-resource-id
Nov 19, 2026
Merged

aabmass merged 2 commits into
open-telemetry:mainfrom
dashpole:gcp-cloud-resource-id

Conversation

@dashpole

Copy link
Copy Markdown
Contributor

Description

Add Cloud Run Jobs detection (CLOUD_RUN_JOB, CLOUD_RUN_EXECUTION, CLOUD_RUN_TASK_INDEX) and populate the incubating cloud.resource_id resource attribute for Cloud Run services, Cloud Run jobs, and Cloud Functions in opentelemetry-resourcedetector-gcp:

  • Cloud Run Service: //run.googleapis.com/projects/{project_id}/locations/{region}/services/{name}
  • Cloud Run Job: //run.googleapis.com/projects/{project_id}/locations/{region}/jobs/{name}
  • Cloud Functions: //cloudfunctions.googleapis.com/projects/{project_id}/locations/{region}/functions/{name}

cloud.resource_id is omitted on GCE, GKE, and App Engine, or when any of projectId, cloud.region, or faas.name is empty. This aligns opentelemetry-resourcedetector-gcp with the Go detector implementation in open-telemetry/opentelemetry-go-contrib#10258 and the Java detector PR in open-telemetry/opentelemetry-java-contrib#3229.

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • I am a human and not a bot
  • I have run tox -e precommit
  • I have run tox -e typecheck
  • I have run the relevant tests and linting tox environments

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Waiting on reviewers · refreshed 2026-11-18 02:51 UTC

Review the latest changes.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

…tect Cloud Run Jobs

Add Cloud Run Jobs resource detection and populate the incubating cloud.resource_id attribute on Cloud Run services, Cloud Run jobs, and Cloud Functions when project ID, region, and service/job/function name are non-empty.
@dashpole
dashpole force-pushed the gcp-cloud-resource-id branch from 1a4b209 to 9469a3c Compare November 17, 2026 21:51
@dashpole
dashpole requested a balanced review from Copilot November 17, 2026 21:51

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.

@tammy-baylis-swi tammy-baylis-swi moved this to Ready for review in Python PR digest Nov 19, 2026
@github-project-automation github-project-automation Bot moved this from Ready for review to Approved PRs in Python PR digest Nov 19, 2026
@aabmass
aabmass added this pull request to the merge queue Nov 19, 2026
Merged via the queue into open-telemetry:main with commit 96a6c59 Nov 19, 2026
770 checks passed
@github-project-automation github-project-automation Bot moved this from Approved PRs to Done in Python PR digest Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants