opentelemetry-resourcedetector-gcp
Google Cloud Resource Detector for OpenTelemetry
What it is and what it does
This package extends OpenTelemetry with automatic detection of Google Cloud Platform resource identifiers. When installed, it integrates with the OpenTelemetry SDK to identify and attach GCP-specific metadata—such as project ID, instance names, and cluster information—to telemetry data, allowing observability platforms to correlate traces and metrics with the underlying cloud infrastructure.
The detector activates automatically once the package is present in your Python environment, or can be explicitly enabled via the OTEL_EXPERIMENTAL_RESOURCE_DETECTORS environment variable. It depends on opentelemetry-api, opentelemetry-sdk, and requests, and is designed for applications running on GCP infrastructure that need to enrich their observability signals with cloud context.
Use it for:
- Automatically tag traces and metrics with GCP project and instance metadata in GKE clusters.
- Enable correlation between application telemetry and GCP resource dashboards in Cloud Trace.
- Simplify multi-environment observability by auto-detecting GCE vs. GKE vs. other GCP compute contexts.
- Reduce manual configuration overhead when deploying OpenTelemetry to GCP workloads.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Automatically detects and reports GCP resource metadata (GCE, GKE, etc.) to OpenTelemetry, enabling observability tools to understand the cloud environment where your application runs.
Yes, if you run applications on GCP and use OpenTelemetry for observability. The package is actively maintained, has no known vulnerabilities, and integrates seamlessly with the OpenTelemetry SDK. Install it as a standard dependency in any GCP-deployed Python service using OpenTelemetry; it requires Python 3.10+ and only activates in GCP environments.
Install
opentelemetry-resourcedetector-gcp on PyPI
pip
pip install opentelemetry-resourcedetector-gcpuv
uv add opentelemetry-resourcedetector-gcppoetry
poetry add opentelemetry-resourcedetector-gcpInstalling opentelemetry-resourcedetector-gcp
Before you install
Low install friction with a pure-Python wheel. Actively maintained as of 2026-07-24 with recent commits; part of the OpenTelemetry ecosystem and positioned in the top 5000 PyPI packages by download volume.
License in practice
Licensed under Apache-2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions.
Quickstart
pip install opentelemetry-resourcedetector-gcp
# Automatically detected by OpenTelemetry SDK when installed
# Or explicitly enable via environment variable:
# export OTEL_EXPERIMENTAL_RESOURCE_DETECTORS=gcp
Requires Python 3.10 or later; only functional in a GCP environment (GCE, GKE, etc.) where resource metadata is available.
Verify before relying
- Whether the detector works in all GCP compute environments (Cloud Run, App Engine, etc.) or only specific ones like GCE and GKE.
- Performance overhead of resource detection on startup time.
- Backward compatibility guarantees given the Beta development status.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — opentelemetry-api, opentelemetry-sdk, requests |
| Maintenance | actively maintained — 21 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 18,513,309/month — #1,082 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: opentelemetry_resourcedetector_gcp-1.14.0-py3-none-any.whl
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
opentelemetry-exporter-gcp-loggingExports OpenTelemetry logs to Google Cloud…
permissive · top 5,000 on PyPI
opentelemetry-resource-detector-azureProvides OpenTelemetry resource detectors that…
permissive · top 5,000 on PyPI
opentelemetry-resource-detector-containeridDetects and registers container runtime…
permissive · top 15,000 on PyPI
opentelemetry-resourcedetector-processExtracts process-level metadata and populates…
permissive · top 5,000 on PyPI
opentelemetry-exporter-gcp-traceExports OpenTelemetry traces to Google Cloud…
permissive · top 5,000 on PyPI
opentelemetry-exporter-gcp-monitoringExports OpenTelemetry metrics to Google Cloud…
permissive · top 5,000 on PyPI
opentelemetry-propagator-gcpPropagates trace context in Google Cloud's…
permissive · top 5,000 on PyPI
opentelemetry-resourcedetector-dockerExtracts Docker container metadata and…
permissive · top 5,000 on PyPI
opentelemetry-resourcedetector-kubernetesDetects and populates OpenTelemetry Resource…
permissive · top 5,000 on PyPI
ci-infoDetects which continuous integration platform…
permissive · top 15,000 on PyPI