datadog_lambda 6.104.0__tar.gz → 6.105.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/PKG-INFO +5 -5
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/README.md +2 -2
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/datadog_lambda/cold_start.py +1 -1
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/datadog_lambda/tracing.py +14 -3
- datadog_lambda-6.105.0/datadog_lambda/version.py +1 -0
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/pyproject.toml +4 -3
- datadog_lambda-6.104.0/datadog_lambda/version.py +0 -1
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/LICENSE +0 -0
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/LICENSE-3rdparty.csv +0 -0
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/NOTICE +0 -0
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/datadog_lambda/__init__.py +0 -0
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/datadog_lambda/api.py +0 -0
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/datadog_lambda/constants.py +0 -0
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/datadog_lambda/dogstatsd.py +0 -0
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/datadog_lambda/extension.py +0 -0
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/datadog_lambda/handler.py +0 -0
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/datadog_lambda/logger.py +0 -0
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/datadog_lambda/metric.py +0 -0
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/datadog_lambda/module_name.py +0 -0
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/datadog_lambda/patch.py +0 -0
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/datadog_lambda/span_pointers.py +0 -0
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/datadog_lambda/stats_writer.py +0 -0
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/datadog_lambda/statsd_writer.py +0 -0
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/datadog_lambda/tag_object.py +0 -0
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/datadog_lambda/tags.py +0 -0
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/datadog_lambda/thread_stats_writer.py +0 -0
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/datadog_lambda/trigger.py +0 -0
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/datadog_lambda/wrapper.py +0 -0
- {datadog_lambda-6.104.0 → datadog_lambda-6.105.0}/datadog_lambda/xray.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: datadog_lambda
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.105.0
|
|
4
4
|
Summary: The Datadog AWS Lambda Library
|
|
5
5
|
Home-page: https://github.com/DataDog/datadog-lambda-python
|
|
6
6
|
License: Apache-2.0
|
|
@@ -18,8 +18,8 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.13
|
|
19
19
|
Provides-Extra: dev
|
|
20
20
|
Requires-Dist: boto3 (>=1.34.0,<2.0.0) ; extra == "dev"
|
|
21
|
-
Requires-Dist: datadog (>=0.
|
|
22
|
-
Requires-Dist: ddtrace (>=2.
|
|
21
|
+
Requires-Dist: datadog (>=0.51.0,<1.0.0)
|
|
22
|
+
Requires-Dist: ddtrace (>=2.20.0)
|
|
23
23
|
Requires-Dist: flake8 (>=5.0.4,<6.0.0) ; extra == "dev"
|
|
24
24
|
Requires-Dist: pytest (>=8.0.0,<9.0.0) ; extra == "dev"
|
|
25
25
|
Requires-Dist: pytest-benchmark (>=4.0,<5.0) ; extra == "dev"
|
|
@@ -37,7 +37,7 @@ Description-Content-Type: text/markdown
|
|
|
37
37
|
[](https://chat.datadoghq.com/)
|
|
38
38
|
[](https://github.com/DataDog/datadog-lambda-python/blob/main/LICENSE)
|
|
39
39
|
|
|
40
|
-
Datadog Lambda Library for Python (3.8, 3.9, 3.10, 3.11, and 3.
|
|
40
|
+
Datadog Lambda Library for Python (3.8, 3.9, 3.10, 3.11, 3.12, and 3.13) enables [enhanced Lambda metrics](https://docs.datadoghq.com/serverless/enhanced_lambda_metrics), [distributed tracing](https://docs.datadoghq.com/serverless/distributed_tracing), and [custom metric submission](https://docs.datadoghq.com/serverless/custom_metrics) from AWS Lambda functions.
|
|
41
41
|
|
|
42
42
|
## Installation
|
|
43
43
|
|
|
@@ -55,7 +55,7 @@ Besides the environment variables supported by dd-trace-py, the datadog-lambda-p
|
|
|
55
55
|
| -------------------- | ------------ | ------------- |
|
|
56
56
|
| DD_ENCODE_AUTHORIZER_CONTEXT | When set to `true` for Lambda authorizers, the tracing context will be encoded into the response for propagation. Supported for NodeJS and Python. | `true` |
|
|
57
57
|
| DD_DECODE_AUTHORIZER_CONTEXT | When set to `true` for Lambdas that are authorized via Lambda authorizers, it will parse and use the encoded tracing context (if found). Supported for NodeJS and Python. | `true` |
|
|
58
|
-
| DD_COLD_START_TRACING |
|
|
58
|
+
| DD_COLD_START_TRACING | When true (default), tracing occurs during cold start which creates many child spans. When false, only one cold start span is created. Used in NodeJS and Python. | `true` |
|
|
59
59
|
| DD_MIN_COLD_START_DURATION | Sets the minimum duration (in milliseconds) for a module load event to be traced via Cold Start Tracing. Number. | `3` |
|
|
60
60
|
| DD_COLD_START_TRACE_SKIP_LIB | optionally skip creating Cold Start Spans for a comma-separated list of libraries. Useful to limit depth or skip known libraries. | `ddtrace.internal.compat,ddtrace.filters` |
|
|
61
61
|
| DD_CAPTURE_LAMBDA_PAYLOAD | [Captures incoming and outgoing AWS Lambda payloads][1] in the Datadog APM spans for Lambda invocations. | `false` |
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
[](https://chat.datadoghq.com/)
|
|
7
7
|
[](https://github.com/DataDog/datadog-lambda-python/blob/main/LICENSE)
|
|
8
8
|
|
|
9
|
-
Datadog Lambda Library for Python (3.8, 3.9, 3.10, 3.11, and 3.
|
|
9
|
+
Datadog Lambda Library for Python (3.8, 3.9, 3.10, 3.11, 3.12, and 3.13) enables [enhanced Lambda metrics](https://docs.datadoghq.com/serverless/enhanced_lambda_metrics), [distributed tracing](https://docs.datadoghq.com/serverless/distributed_tracing), and [custom metric submission](https://docs.datadoghq.com/serverless/custom_metrics) from AWS Lambda functions.
|
|
10
10
|
|
|
11
11
|
## Installation
|
|
12
12
|
|
|
@@ -24,7 +24,7 @@ Besides the environment variables supported by dd-trace-py, the datadog-lambda-p
|
|
|
24
24
|
| -------------------- | ------------ | ------------- |
|
|
25
25
|
| DD_ENCODE_AUTHORIZER_CONTEXT | When set to `true` for Lambda authorizers, the tracing context will be encoded into the response for propagation. Supported for NodeJS and Python. | `true` |
|
|
26
26
|
| DD_DECODE_AUTHORIZER_CONTEXT | When set to `true` for Lambdas that are authorized via Lambda authorizers, it will parse and use the encoded tracing context (if found). Supported for NodeJS and Python. | `true` |
|
|
27
|
-
| DD_COLD_START_TRACING |
|
|
27
|
+
| DD_COLD_START_TRACING | When true (default), tracing occurs during cold start which creates many child spans. When false, only one cold start span is created. Used in NodeJS and Python. | `true` |
|
|
28
28
|
| DD_MIN_COLD_START_DURATION | Sets the minimum duration (in milliseconds) for a module load event to be traced via Cold Start Tracing. Number. | `3` |
|
|
29
29
|
| DD_COLD_START_TRACE_SKIP_LIB | optionally skip creating Cold Start Spans for a comma-separated list of libraries. Useful to limit depth or skip known libraries. | `ddtrace.internal.compat,ddtrace.filters` |
|
|
30
30
|
| DD_CAPTURE_LAMBDA_PAYLOAD | [Captures incoming and outgoing AWS Lambda payloads][1] in the Datadog APM spans for Lambda invocations. | `false` |
|
|
@@ -30,10 +30,10 @@ from datadog_lambda.xray import (
|
|
|
30
30
|
parse_xray_header,
|
|
31
31
|
)
|
|
32
32
|
|
|
33
|
-
from ddtrace import
|
|
33
|
+
from ddtrace import patch
|
|
34
34
|
from ddtrace import __version__ as ddtrace_version
|
|
35
35
|
from ddtrace.propagation.http import HTTPPropagator
|
|
36
|
-
from ddtrace.
|
|
36
|
+
from ddtrace.trace import Context, Span, tracer
|
|
37
37
|
from datadog_lambda import __version__ as datadog_lambda_version
|
|
38
38
|
from datadog_lambda.trigger import (
|
|
39
39
|
_EventSource,
|
|
@@ -384,12 +384,23 @@ def _parse_high_64_bits(trace_tags: str) -> str:
|
|
|
384
384
|
|
|
385
385
|
|
|
386
386
|
def _generate_sfn_parent_id(context: dict) -> int:
|
|
387
|
+
"""
|
|
388
|
+
The upstream Step Function can propagate its execution context to downstream Lambdas. The
|
|
389
|
+
Lambda can use these details to share the same traceID and infer its parent's spanID.
|
|
390
|
+
|
|
391
|
+
Excluding redriveCount when its 0 to account for cases where customers are using an old
|
|
392
|
+
version of the Lambda layer that doesn't use this value for its parentID generation.
|
|
393
|
+
"""
|
|
387
394
|
execution_id = context.get("Execution").get("Id")
|
|
395
|
+
redrive_count = context.get("Execution").get("RedriveCount", 0)
|
|
388
396
|
state_name = context.get("State").get("Name")
|
|
389
397
|
state_entered_time = context.get("State").get("EnteredTime")
|
|
390
398
|
|
|
399
|
+
redrive_postfix = "" if redrive_count == 0 else f"#{redrive_count}"
|
|
400
|
+
|
|
391
401
|
return _deterministic_sha256_hash(
|
|
392
|
-
f"{execution_id}#{state_name}#{state_entered_time}",
|
|
402
|
+
f"{execution_id}#{state_name}#{state_entered_time}{redrive_postfix}",
|
|
403
|
+
HIGHER_64_BITS,
|
|
393
404
|
)
|
|
394
405
|
|
|
395
406
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "6.105.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "datadog_lambda"
|
|
3
|
-
version = "6.
|
|
3
|
+
version = "6.105.0"
|
|
4
4
|
description = "The Datadog AWS Lambda Library"
|
|
5
5
|
authors = ["Datadog, Inc. <dev@datadoghq.com>"]
|
|
6
6
|
license = "Apache-2.0"
|
|
@@ -21,13 +21,14 @@ classifiers = [
|
|
|
21
21
|
"Programming Language :: Python :: 3.10",
|
|
22
22
|
"Programming Language :: Python :: 3.11",
|
|
23
23
|
"Programming Language :: Python :: 3.12",
|
|
24
|
+
"Programming Language :: Python :: 3.13",
|
|
24
25
|
]
|
|
25
26
|
|
|
26
27
|
[tool.poetry.dependencies]
|
|
27
28
|
python = ">=3.8.0,<4"
|
|
28
|
-
datadog = ">=0.
|
|
29
|
+
datadog = ">=0.51.0,<1.0.0"
|
|
29
30
|
wrapt = "^1.11.2"
|
|
30
|
-
ddtrace = ">=2.
|
|
31
|
+
ddtrace = ">=2.20.0"
|
|
31
32
|
ujson = ">=5.9.0"
|
|
32
33
|
boto3 = { version = "^1.34.0", optional = true }
|
|
33
34
|
requests = { version ="^2.22.0", optional = true }
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "6.104.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|