opentelemetry-exporter-gcp-logging
Google Cloud Logging exporter for OpenTelemetry
What it is and what it does
This package bridges OpenTelemetry's logging framework to Google Cloud Logging, allowing you to export application logs as structured records within GCP's observability stack. It wraps the google-cloud-logging client and integrates with OpenTelemetry's SDK to attach resource metadata, service identifiers, and trace context to each log entry.
However, the package is explicitly deprecated. Google Cloud now recommends using standard OpenTelemetry Protocol (OTLP) exporters instead, which provide native ingestion for logs, traces, and metrics through a single unified API. If you are starting a new project on GCP, the migration guide in the repository should be your first stop; this exporter is primarily useful for maintaining existing applications that already depend on it.
Use it for:
- Export application logs from Python services running on GKE, Cloud Run, or GCE to Cloud Logging with OpenTelemetry metadata.
- Write structured JSON logs to stdout in GCP environments using SimpleLogRecordProcessor for agent-based ingestion.
- Attach service name, instance ID, and trace context to logs for correlation with traces and metrics in Cloud Console.
- Migrate legacy Python logging to OpenTelemetry while keeping logs in Cloud Logging during a transition period.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Exports OpenTelemetry logs to Google Cloud Logging, integrating application observability with GCP's native logging infrastructure.
Yes, but with strong conditions: install only if you are maintaining an existing application already using this exporter or if you need to migrate legacy logging to OpenTelemetry while staying on Cloud Logging. For new projects on GCP, use native OTLP exporters instead per the official migration guide. The package is actively maintained and has no known vulnerabilities, but its deprecation status means it will not receive new features.
Install
opentelemetry-exporter-gcp-logging on PyPI
pip
pip install opentelemetry-exporter-gcp-logginguv
uv add opentelemetry-exporter-gcp-loggingpoetry
poetry add opentelemetry-exporter-gcp-loggingInstalling opentelemetry-exporter-gcp-logging
Before you install
Low install friction with a pure-Python wheel. Actively maintained as of August 2026, though the package is explicitly deprecated in favor of native OTLP ingestion via Google Cloud's Telemetry API.
License in practice
Apache-2.0 permissive license allows use in most projects without restriction, including commercial applications.
Quickstart
pip install opentelemetry-exporter-gcp-logging
from opentelemetry.exporter.cloud_logging import CloudLoggingExporter
from opentelemetry.sdk._logs import LoggerProvider
from opentelemetry.sdk._logs.export import BatchLogRecordProcessor
logger_provider = LoggerProvider()
exporter = CloudLoggingExporter(default_log_name='my_log')
logger_provider.add_log_record_processor(BatchLogRecordProcessor(exporter))
Requires google-cloud-logging credentials configured for GCP authentication (typically via Application Default Credentials or explicit service account key).
Verify before relying
- Whether the deprecation notice means this package will be removed or simply no longer receive feature updates.
- Performance characteristics when exporting high-volume logs compared to native OTLP ingestion.
- Compatibility with custom log attributes and structured JSON output beyond the documented examples.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — google-cloud-logging, opentelemetry-sdk, opentelemetry-api, opentelemetry-resourcedetector-gcp, typing-extensions |
| Maintenance | actively maintained — 11 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 7,726,410/month — #1,702 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: opentelemetry_exporter_gcp_logging-1.14.0a0-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-monitoringExports OpenTelemetry metrics to Google Cloud…
permissive · top 5,000 on PyPI
opentelemetry-exporter-gcp-traceExports OpenTelemetry traces to Google Cloud…
permissive · top 5,000 on PyPI
opentelemetry-resourcedetector-gcpAutomatically detects and reports GCP resource…
permissive · top 5,000 on PyPI
opentelemetry-exporter-otlp-proto-grpcExports telemetry data from Python applications…
permissive · top 1,000 on PyPI
opentelemetry-propagator-gcpPropagates trace context in Google Cloud's…
permissive · top 5,000 on PyPI
opentelemetry-exporter-otlpInstalls OpenTelemetry exporters for sending…
permissive · top 1,000 on PyPI
azure-monitor-opentelemetry-exporterExports OpenTelemetry traces, metrics, and logs…
permissive · top 1,000 on PyPI
opentelemetry-exporter-jaegerInstalls Jaeger exporters for OpenTelemetry to…
permissive · top 15,000 on PyPI
opentelemetry-exporter-otlp-proto-commonProvides Protobuf encoding utilities for…
permissive · top 1,000 on PyPI