skillfed

opentelemetry-exporter-gcp-logging

Google Cloud Logging exporter for OpenTelemetry

opentelemetry-exporter-gcp-logging v1.14.0a0 7.7M downloads/30d#1,702 on PyPI83
Permissive license Apache-2.0 Active released

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

uv

uv add opentelemetry-exporter-gcp-logging

poetry

poetry add opentelemetry-exporter-gcp-logging

Installing 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

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.9

Tags

opentelemetry google cloud logging exportergcp cloud logging otelopentelemetry logs to cloud logginggoogle cloud observability pythonotel gcp exportercloud logging structured json exportopentelemetry log processor gcp
observabilitydeprecatedgcp-integration

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

Exports OpenTelemetry metrics to Google Cloud…

permissive · top 5,000 on PyPI

opentelemetry-exporter-gcp-trace

Exports OpenTelemetry traces to Google Cloud…

permissive · top 5,000 on PyPI

opentelemetry-resourcedetector-gcp

Automatically detects and reports GCP resource…

permissive · top 5,000 on PyPI

opentelemetry-exporter-otlp-proto-grpc

Exports telemetry data from Python applications…

permissive · top 1,000 on PyPI

opentelemetry-propagator-gcp

Propagates trace context in Google Cloud's…

permissive · top 5,000 on PyPI

opentelemetry-exporter-otlp

Installs OpenTelemetry exporters for sending…

permissive · top 1,000 on PyPI

azure-monitor-opentelemetry-exporter

Exports OpenTelemetry traces, metrics, and logs…

permissive · top 1,000 on PyPI

opentelemetry-exporter-jaeger

Installs Jaeger exporters for OpenTelemetry to…

permissive · top 15,000 on PyPI

opentelemetry-exporter-otlp-proto-common

Provides Protobuf encoding utilities for…

permissive · top 1,000 on PyPI