skillfed

opentelemetry-resourcedetector-gcp

Google Cloud Resource Detector for OpenTelemetry

opentelemetry-resourcedetector-gcp v1.14.0 18.5M downloads/30d#1,082 on PyPI1,086
Permissive license Apache-2.0 Active released

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-gcp

uv

uv add opentelemetry-resourcedetector-gcp

poetry

poetry add opentelemetry-resourcedetector-gcp

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

gcp resource detection opentelemetrygoogle cloud resource detectorgke gce telemetry metadataopentelemetry gcp integrationcloud resource attributes
gcp-integrationobservabilityresource-detection

More Monitoring packages

tqdm

Wraps any iterable to display a real-time…

copyleft · top 100 on PyPI

opentelemetry-semantic-conventions

Provides generated Python code for…

permissive · top 100 on PyPI

opentelemetry-sdk

Provides the reference implementation of the…

permissive · top 100 on PyPI

opentelemetry-api

Provides the abstract API and interfaces for…

permissive · top 100 on PyPI

opentelemetry-exporter-otlp-proto-http

Exports OpenTelemetry observability data to an…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation

Provides automatic instrumentation commands and…

permissive · top 1,000 on PyPI

opentelemetry-exporter-gcp-logging

Exports OpenTelemetry logs to Google Cloud…

permissive · top 5,000 on PyPI

opentelemetry-resource-detector-azure

Provides OpenTelemetry resource detectors that…

permissive · top 5,000 on PyPI

opentelemetry-resource-detector-containerid

Detects and registers container runtime…

permissive · top 15,000 on PyPI

opentelemetry-resourcedetector-process

Extracts process-level metadata and populates…

permissive · top 5,000 on PyPI

opentelemetry-exporter-gcp-trace

Exports OpenTelemetry traces to Google Cloud…

permissive · top 5,000 on PyPI

opentelemetry-exporter-gcp-monitoring

Exports OpenTelemetry metrics to Google Cloud…

permissive · top 5,000 on PyPI

opentelemetry-propagator-gcp

Propagates trace context in Google Cloud's…

permissive · top 5,000 on PyPI

opentelemetry-resourcedetector-docker

Extracts Docker container metadata and…

permissive · top 5,000 on PyPI

opentelemetry-resourcedetector-kubernetes

Detects and populates OpenTelemetry Resource…

permissive · top 5,000 on PyPI

ci-info

Detects which continuous integration platform…

permissive · top 15,000 on PyPI