Skip to main content

OpenTelemetry Google Generative AI instrumentation

Project description

OpenTelemetry Google Generative AI Instrumentation

This library allows tracing Google Gemini prompts and completions sent with the official Google Generative AI library.

Installation

pip install opentelemetry-instrumentation-google-generativeai

Example usage

from opentelemetry.instrumentation.google-generativeai import GoogleGenerativeAiInstrumentor

GoogleGenerativeAiInstrumentor().instrument()

Privacy

By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

TRACELOOP_TRACE_CONTENT=false

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

File details

Details for the file opentelemetry_instrumentation_google_generativeai-0.33.11.tar.gz.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_google_generativeai-0.33.11.tar.gz
Algorithm Hash digest
SHA256 57db830ac721b99daba159a3cae5db6b2c82d38d6d978e7af9b85378c95f1507
MD5 b1470d60f2d58a7e11e06851d625aa55
BLAKE2b-256 01922ad98b310c72009974d6ecada061afd3e6fecb57f9f31bb8525170b000b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentelemetry_instrumentation_google_generativeai-0.33.11.tar.gz:

Publisher: release.yml on traceloop/openllmetry

Attestations:

File details

Details for the file opentelemetry_instrumentation_google_generativeai-0.33.11-py3-none-any.whl.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_google_generativeai-0.33.11-py3-none-any.whl
Algorithm Hash digest
SHA256 eee3601bcd1cbd2ae3104c5647068ea08bef36c1a24772a3d9f7a01058d9e2d7
MD5 cf461ba814d508e2d6ef95bf122b1b83
BLAKE2b-256 fb197c166a2d09fd8c20e11e44015fc72b736d10a7d2656f4bf2fbec16be521b

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentelemetry_instrumentation_google_generativeai-0.33.11-py3-none-any.whl:

Publisher: release.yml on traceloop/openllmetry

Attestations:

Supported by

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