Skip to content

Inferred spans for AWS Managed Services #204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Feb 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
pip install .[dev]

- name: Install Serverless Framework
run: sudo yarn global add serverless --prefix /usr/local
run: sudo yarn global add serverless@^2.72.2 --prefix /usr/local
- name: Install Crossbuild Deps
run: sudo apt install -y qemu-user-static binfmt-support

Expand Down
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![Slack](https://chat.datadoghq.com/badge.svg?bg=632CA6)](https://chat.datadoghq.com/)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/DataDog/datadog-lambda-python/blob/main/LICENSE)

Datadog Lambda Library for Python (3.6, 3.7, 3.8, and 3.9) enables enhanced Lambda metrics, distributed tracing, and custom metric submission from AWS Lambda functions.
Datadog Lambda Library for Python (3.6, 3.7, 3.8, and 3.9) enables enhanced Lambda metrics, distributed tracing, and custom metric submission from AWS Lambda functions.

**IMPORTANT NOTE:** AWS Lambda is expected to receive a [breaking change](https://aws.amazon.com/blogs/compute/upcoming-changes-to-the-python-sdk-in-aws-lambda/) on **March 31, 2021**. If you are using Datadog Python Lambda layer version 7 or below, please upgrade to the latest.

Expand Down Expand Up @@ -103,6 +103,24 @@ Initialize the Datadog tracer when set to `true`. Defaults to `false`.

Set to `true` to merge the X-Ray trace and the Datadog trace, when using both the X-Ray and Datadog tracing. Defaults to `false`.

### DD_TRACE_MANAGED_SERVICES (experimental)

Inferred Spans are spans that Datadog can create based on incoming event metadata.
Set `DD_TRACE_MANAGED_SERVICES` to `true` to infer spans based on Lambda events.
Inferring upstream spans is only supported if you are using the [Datadog Lambda Extension](https://docs.datadoghq.com/serverless/libraries_integrations/extension/).
Defaults to `true`.
Infers spans for:

- API Gateway REST events
- API Gateway WebSocket events
- HTTP API events
- SQS
- SNS (SNS messaged delivered via SQS are also supported)
- Kinesis Streams (if data is a JSON string or base64 encoded JSON string)
- EventBridge (custom events, where Details is a JSON string)
- S3
- DynamoDB

## Opening Issues

If you encounter a bug with this package, we want to hear about it. Before opening a new issue, search the existing issues to avoid duplicates.
Expand Down
3 changes: 2 additions & 1 deletion datadog_lambda/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019 Datadog, Inc.


# Datadog trace sampling priority


class SamplingPriority(object):
USER_REJECT = -1
AUTO_REJECT = 0
Expand Down
Loading