Sentry for Python on Google Cloud Functions

Using Sentry with Google Cloud Functions and Python makes debugging as painless as possible, so you can keep everything up and running.

Getting Started is Simple

Add the Sentry SDK to your requirements.txt:

Click to Copy
pip install sentry-sdk

Then use the GCP Functions integration for the Python SDK like this:

Click to Copy
import sentry_sdk from sentry_sdk.integrations.gcp import GcpIntegration sentry_sdk.init( dsn="https://<key>@sentry.io/<project>", integrations=[GcpIntegration()], traces_sample_rate=1.0, # adjust the sample rate in production as needed ) def http_function_entrypoint(request): # ...

Check our documentation for the latest instructions.

See all platforms

More than 100K Organizations Trust Sentry with Their Application Monitoring

$<!-- -->Github<!-- --> logo
$<!-- -->Atlassian<!-- --> logo
$<!-- -->Disney<!-- --> logo
$<!-- -->Cloudflare<!-- --> logo
$<!-- -->Microsoft<!-- --> logo
$<!-- -->Lush<!-- --> logo

Code-Level Visibility

View stack traces on issues, user-agent information, and all the metadata around an issue for all the context needed to resolve the issue.

Quickly Identify Function Latencies

Trace those ten-second page loads to poor-performing API calls and slow database queries. The event detail waterfall visually highlights what calls are giving your customers a poor experience.

Fill in the Gaps

See what happened leading up to the issue. Get function execution details including function metadata, execution time, Amazon Resource Name, and function identity.

FAQs

Sentry uses run-time instrumentation to capture errors. This allows users to get to the root of the problems using stack traces, breadcrumbs, function context and environment context.

CloudWatch/Stackdriver logs and metrics are hard to use to debug issues. The information is limited to some log statements and usually don't have the context needed to debug issues.

Sentry uses run-time instrumentation to get real time visibility into execution environment and report all relevant info to be able to quickly debug issues. For example source code visibility when issues occur.

CloudWatch or Stackdriver log forwarding requires parsing through logs and usually are limited to details that already exist in logs.

Sentry supports distributed tracing in addition to error monitoring for serverless functions.

You can get started for free. Pricing depends on the number of monthly events, transactions, and attachments that you send Sentry. For more details, visit our pricing page.

Supporting Resources

The Sentry Blog

A better experience for your users. An easier life for your developers.

© 2024 • Sentry is a registered Trademark of Functional Software, Inc.