Skip to main content

OpenTelemetry google-api-python-client instrumentation

Project description

pypi

This library allows tracing requests made through the google-api-python-client library. Every call to HttpRequest.execute produces a CLIENT span named gcp.api/<methodId> with the following attributes:

  • rpc.method — the fully-qualified API method, e.g. storage.buckets.list

  • gcp.client.service — the GCP service, e.g. storage (OTel semconv)

  • http.request.method — the HTTP method

  • server.address / server.port — the request host (port only when non-default)

  • url.full — the request URL, with credentials and sensitive query values (e.g. X-Goog-Signature) redacted

On failure the span status is set to ERROR with error.type, and for googleapiclient.errors.HttpError the http.response.status_code is recorded.

Installation

pip install opentelemetry-instrumentation-google-api-client

Usage

from opentelemetry.instrumentation.google_api_client import (
    GoogleApiClientInstrumentor,
)
from googleapiclient.discovery import build

GoogleApiClientInstrumentor().instrument()

service = build("storage", "v1")
service.buckets().list(project="my-project").execute()

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file opentelemetry_instrumentation_google_api_client-0.1.0.tar.gz.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_google_api_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 83e1e6c7e4dc3c4c8c62faea6b113b37be36793cefc7dde9cf1c8823a2a4678e
MD5 0c86b2d1f0d5a7d1bf98fdef565d5c3b
BLAKE2b-256 3ed6edf93347f0137503311c69d7ae46947ff1a5cdafdd421ecab1bf1ecdbc17

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentelemetry_instrumentation_google_api_client-0.1.0.tar.gz:

Publisher: publish.yml on federicobond/opentelemetry-instrumentation-google-api-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file opentelemetry_instrumentation_google_api_client-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_google_api_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e34ef6c7cef4cd665f7b3d2bd07799ef9eb2b838cd351707302a0b60e5be3de
MD5 8f222cf88e1b89f1e1de78452b5ce0d7
BLAKE2b-256 2b6d2f60dfc7624c99c4e82cfbc49a4e4a0204baebfd24959083468876766f01

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentelemetry_instrumentation_google_api_client-0.1.0-py3-none-any.whl:

Publisher: publish.yml on federicobond/opentelemetry-instrumentation-google-api-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page