datadog-serverless-compat


Namedatadog-serverless-compat JSON
Version 0.4.0 PyPI version JSON
download
home_pagehttps://github.com/DataDog/datadog-serverless-compat-py
SummaryDatadog Serverless Compatibility Layer for Python
upload_time2025-02-13 14:05:23
maintainerNone
docs_urlNone
authorDatadog, Inc.
requires_python<4.0,>=3.9
licenseApache-2.0
keywords datadog azure google functions
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Datadog Serverless Compatibility Layer for Python

Datadog library for Python to enable tracing and custom metric submission from Azure Functions and Google Cloud Run Functions (1st gen).

## Installation

1. Install the Datadog Serverless Compatibility Layer.
```
pip install datadog-serverless-compat
```

2. Install the Datadog Tracing Library following the official documentation for [Tracing Python Applications](https://docs.datadoghq.com/tracing/trace_collection/automatic_instrumentation/dd_libraries/python).

3. Add the Datadog Serverless Compatibility Layer and the Datadog Tracer in code.

```
from datadog_serverless_compat import start
from ddtrace import tracer, patch_all

start()
patch_all()
```

## Configuration

1. Set Datadog environment variables
  - `DD_API_KEY` = `<YOUR API KEY>`
  - `DD_SITE` = `datadoghq.com`
  - `DD_ENV` = `<ENVIRONMENT`
  - `DD_SERVICE` = `<SERVICE NAME>`
  - `DD_VERSION` = `<VERSION>`

The default Datadog site is **datadoghq.com**. To use a different site, set the `DD_SITE` environment variable to the desired destination site. See [Getting Started with Datadog Sites](https://docs.datadoghq.com/getting_started/site/) for the available site values.

The `DD_SERVICE`, `DD_ENV`, and `DD_VERSION` settings are configured from environment variables in Azure and are used to tie telemetry together in Datadog as tags. Read more about [Datadog Unified Service Tagging](https://docs.datadoghq.com/getting_started/tagging/unified_service_tagging).

[Trace Metrics](https://docs.datadoghq.com/tracing/metrics/metrics_namespace/) are enabled by default but can be disabled with the `DD_TRACE_STATS_COMPUTATION_ENABLED` environment variable.

Enable debug logs for the Datadog Serverless Compatibility Layer with the `DD_LOG_LEVEL` environment variable:

```
DD_LOG_LEVEL=debug
```

Alternatively disable logs for the Datadog Serverless Compatibility Layer with the `DD_LOG_LEVEL` environment variable:

```
DD_LOG_LEVEL=off
```

1. For additional tracing configuration options, see the [official documentation for Datadog trace client](https://ddtrace.readthedocs.io/en/stable/configuration.html).

2. If installing to Azure Functions, install the [Datadog Azure Integration](https://docs.datadoghq.com/integrations/azure/#setup) and set tags on your Azure Functions to further extend unified service tagging. This allows for Azure Function metrics and other Azure metrics to be correlated with traces.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/DataDog/datadog-serverless-compat-py",
    "name": "datadog-serverless-compat",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "datadog, azure, google, functions",
    "author": "Datadog, Inc.",
    "author_email": "dev@datadoghq.com",
    "download_url": "https://files.pythonhosted.org/packages/a5/75/360e6868d069657790cb410b06a80591986f16a01912f0d36a73ebd71e46/datadog_serverless_compat-0.4.0.tar.gz",
    "platform": null,
    "description": "# Datadog Serverless Compatibility Layer for Python\n\nDatadog library for Python to enable tracing and custom metric submission from Azure Functions and Google Cloud Run Functions (1st gen).\n\n## Installation\n\n1. Install the Datadog Serverless Compatibility Layer.\n```\npip install datadog-serverless-compat\n```\n\n2. Install the Datadog Tracing Library following the official documentation for [Tracing Python Applications](https://docs.datadoghq.com/tracing/trace_collection/automatic_instrumentation/dd_libraries/python).\n\n3. Add the Datadog Serverless Compatibility Layer and the Datadog Tracer in code.\n\n```\nfrom datadog_serverless_compat import start\nfrom ddtrace import tracer, patch_all\n\nstart()\npatch_all()\n```\n\n## Configuration\n\n1. Set Datadog environment variables\n  - `DD_API_KEY` = `<YOUR API KEY>`\n  - `DD_SITE` = `datadoghq.com`\n  - `DD_ENV` = `<ENVIRONMENT`\n  - `DD_SERVICE` = `<SERVICE NAME>`\n  - `DD_VERSION` = `<VERSION>`\n\nThe default Datadog site is **datadoghq.com**. To use a different site, set the `DD_SITE` environment variable to the desired destination site. See [Getting Started with Datadog Sites](https://docs.datadoghq.com/getting_started/site/) for the available site values.\n\nThe `DD_SERVICE`, `DD_ENV`, and `DD_VERSION` settings are configured from environment variables in Azure and are used to tie telemetry together in Datadog as tags. Read more about [Datadog Unified Service Tagging](https://docs.datadoghq.com/getting_started/tagging/unified_service_tagging).\n\n[Trace Metrics](https://docs.datadoghq.com/tracing/metrics/metrics_namespace/) are enabled by default but can be disabled with the `DD_TRACE_STATS_COMPUTATION_ENABLED` environment variable.\n\nEnable debug logs for the Datadog Serverless Compatibility Layer with the `DD_LOG_LEVEL` environment variable:\n\n```\nDD_LOG_LEVEL=debug\n```\n\nAlternatively disable logs for the Datadog Serverless Compatibility Layer with the `DD_LOG_LEVEL` environment variable:\n\n```\nDD_LOG_LEVEL=off\n```\n\n1. For additional tracing configuration options, see the [official documentation for Datadog trace client](https://ddtrace.readthedocs.io/en/stable/configuration.html).\n\n2. If installing to Azure Functions, install the [Datadog Azure Integration](https://docs.datadoghq.com/integrations/azure/#setup) and set tags on your Azure Functions to further extend unified service tagging. This allows for Azure Function metrics and other Azure metrics to be correlated with traces.\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Datadog Serverless Compatibility Layer for Python",
    "version": "0.4.0",
    "project_urls": {
        "Homepage": "https://github.com/DataDog/datadog-serverless-compat-py",
        "Repository": "https://github.com/DataDog/datadog-serverless-compat-py"
    },
    "split_keywords": [
        "datadog",
        " azure",
        " google",
        " functions"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0cad2751d5d56cf881f4dff3c09d565ec3d9fa5b99807e266b2b4750a7b3fcf1",
                "md5": "21a681a44a2ddc2cc26997408823ce04",
                "sha256": "39494a130ce001583a12d01266fd8ec1707ed6ef825b840e3c0e6c2cd158c904"
            },
            "downloads": -1,
            "filename": "datadog_serverless_compat-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "21a681a44a2ddc2cc26997408823ce04",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 4558217,
            "upload_time": "2025-02-13T14:05:21",
            "upload_time_iso_8601": "2025-02-13T14:05:21.469568Z",
            "url": "https://files.pythonhosted.org/packages/0c/ad/2751d5d56cf881f4dff3c09d565ec3d9fa5b99807e266b2b4750a7b3fcf1/datadog_serverless_compat-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a575360e6868d069657790cb410b06a80591986f16a01912f0d36a73ebd71e46",
                "md5": "dc015c5a3d95184c9d377f77ffb0d2bd",
                "sha256": "32e8751fa89ed69149b0d7675be6440b2a6c4b560d4faba4d4977e39caa8ca56"
            },
            "downloads": -1,
            "filename": "datadog_serverless_compat-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "dc015c5a3d95184c9d377f77ffb0d2bd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 4559005,
            "upload_time": "2025-02-13T14:05:23",
            "upload_time_iso_8601": "2025-02-13T14:05:23.270482Z",
            "url": "https://files.pythonhosted.org/packages/a5/75/360e6868d069657790cb410b06a80591986f16a01912f0d36a73ebd71e46/datadog_serverless_compat-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-13 14:05:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "DataDog",
    "github_project": "datadog-serverless-compat-py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "datadog-serverless-compat"
}
        
Elapsed time: 0.71176s