Skip to main content

Utilities for integration between serverless execution environments and DataDog

Project description

DataDog Serverless Utils

Utilities for integration between serverless execution environments and DataDog

Error Tracking for Serverless Execution Environments

Serverless execution environments (e.g. Cloud Functions) are finished by the cloud provider as soon as the execution finished. Sometimes, the DataDog tracer (ddtrace) does not have a chance to send the collected traces especially when it ends abruptly due to an unhandled exception.

This library offers a decorator to make sure ddtrace can send the telemetry data before the execution ends.

Setup

Make sure ddtrace config is correctly set up as mentioned on the docs.

Usage

Decorate your function as follows and voilà!

from datadog_serverless_utils import datadog_serverless


@datadog_serverless
def main():
    ...

A return value can be specified for the case when the decorated function raises an unhandled exception via the parameter error_return_value:

@datadog_serverless(error_return_value="my_value")
def main():
    ...

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

datadog-serverless-utils-1.0.2.tar.gz (2.6 kB view details)

Uploaded Source

File details

Details for the file datadog-serverless-utils-1.0.2.tar.gz.

File metadata

File hashes

Hashes for datadog-serverless-utils-1.0.2.tar.gz
Algorithm Hash digest
SHA256 80b7248721696bf44c28f701bafad8e65ce1bb21ad4cdc48b6281402f23d5c4d
MD5 592d960d59161a9c58f7f2596737f370
BLAKE2b-256 3c3761712894c66055663cea60491cf4eca4cc7a9ec76ac932bd7a3ff3319ad5

See more details on using hashes here.

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