datadog_lambda 8.120.0__py3-none-any.whl → 8.121.0__py3-none-any.whl
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/asm.py +3 -1
- datadog_lambda/tracing.py +18 -6
- datadog_lambda/version.py +1 -1
- datadog_lambda/wrapper.py +10 -2
- datadog_lambda-8.121.0.dist-info/METADATA +24 -0
- {datadog_lambda-8.120.0.dist-info → datadog_lambda-8.121.0.dist-info}/RECORD +10 -10
- datadog_lambda-8.120.0.dist-info/METADATA +0 -110
- {datadog_lambda-8.120.0.dist-info → datadog_lambda-8.121.0.dist-info}/LICENSE +0 -0
- {datadog_lambda-8.120.0.dist-info → datadog_lambda-8.121.0.dist-info}/LICENSE-3rdparty.csv +0 -0
- {datadog_lambda-8.120.0.dist-info → datadog_lambda-8.121.0.dist-info}/NOTICE +0 -0
- {datadog_lambda-8.120.0.dist-info → datadog_lambda-8.121.0.dist-info}/WHEEL +0 -0
datadog_lambda/asm.py
CHANGED
|
@@ -223,7 +223,9 @@ def get_asm_blocked_response(
|
|
|
223
223
|
content = ""
|
|
224
224
|
else:
|
|
225
225
|
content_type = blocked.get("content-type", "application/json")
|
|
226
|
-
content = http_utils._get_blocked_template(
|
|
226
|
+
content = http_utils._get_blocked_template(
|
|
227
|
+
content_type, blocked.get("block_id", "default")
|
|
228
|
+
)
|
|
227
229
|
|
|
228
230
|
response = {
|
|
229
231
|
"statusCode": blocked.get("status_code", 403),
|
datadog_lambda/tracing.py
CHANGED
|
@@ -927,6 +927,7 @@ def create_inferred_span_from_lambda_function_url_event(event, context):
|
|
|
927
927
|
InferredSpanInfo.set_tags(tags, tag_source="self", synchronicity="sync")
|
|
928
928
|
if span:
|
|
929
929
|
span.set_tags(tags)
|
|
930
|
+
span.set_metric(InferredSpanInfo.METRIC, 1.0)
|
|
930
931
|
span.start_ns = int(request_time_epoch * 1e6)
|
|
931
932
|
return span
|
|
932
933
|
|
|
@@ -1047,6 +1048,7 @@ def create_inferred_span_from_api_gateway_websocket_event(
|
|
|
1047
1048
|
span = tracer.trace("aws.apigateway.websocket", **args)
|
|
1048
1049
|
if span:
|
|
1049
1050
|
span.set_tags(tags)
|
|
1051
|
+
span.set_metric(InferredSpanInfo.METRIC, 1.0)
|
|
1050
1052
|
span.start_ns = int(
|
|
1051
1053
|
finish_time_ns
|
|
1052
1054
|
if finish_time_ns is not None
|
|
@@ -1061,6 +1063,8 @@ def create_inferred_span_from_api_gateway_event(
|
|
|
1061
1063
|
event, context, decode_authorizer_context: bool = True
|
|
1062
1064
|
):
|
|
1063
1065
|
request_context = event.get("requestContext")
|
|
1066
|
+
identity = request_context.get("identity")
|
|
1067
|
+
|
|
1064
1068
|
domain = request_context.get("domainName", "")
|
|
1065
1069
|
api_id = request_context.get("apiId")
|
|
1066
1070
|
service_name = determine_service_name(
|
|
@@ -1072,11 +1076,11 @@ def create_inferred_span_from_api_gateway_event(
|
|
|
1072
1076
|
resource_path = _get_resource_path(event, request_context)
|
|
1073
1077
|
resource = f"{method} {resource_path}"
|
|
1074
1078
|
tags = {
|
|
1075
|
-
"operation_name": "aws.apigateway.rest",
|
|
1076
1079
|
"http.url": http_url,
|
|
1077
1080
|
"endpoint": path,
|
|
1078
1081
|
"http.method": method,
|
|
1079
1082
|
"resource_names": resource,
|
|
1083
|
+
"http.useragent": identity.get("userAgent"),
|
|
1080
1084
|
"span.kind": "server",
|
|
1081
1085
|
"apiid": api_id,
|
|
1082
1086
|
"apiname": api_id,
|
|
@@ -1091,7 +1095,7 @@ def create_inferred_span_from_api_gateway_event(
|
|
|
1091
1095
|
args = {
|
|
1092
1096
|
"service": service_name,
|
|
1093
1097
|
"resource": resource,
|
|
1094
|
-
"span_type": "
|
|
1098
|
+
"span_type": "web",
|
|
1095
1099
|
}
|
|
1096
1100
|
tracer.set_tags(_dd_origin)
|
|
1097
1101
|
upstream_authorizer_span = None
|
|
@@ -1103,6 +1107,7 @@ def create_inferred_span_from_api_gateway_event(
|
|
|
1103
1107
|
span = tracer.trace("aws.apigateway", **args)
|
|
1104
1108
|
if span:
|
|
1105
1109
|
span.set_tags(tags)
|
|
1110
|
+
span.set_metric(InferredSpanInfo.METRIC, 1.0)
|
|
1106
1111
|
# start time pushed by the inserted authorizer span
|
|
1107
1112
|
span.start_ns = int(
|
|
1108
1113
|
finish_time_ns
|
|
@@ -1140,13 +1145,12 @@ def create_inferred_span_from_http_api_event(
|
|
|
1140
1145
|
resource_path = _get_resource_path(event, request_context)
|
|
1141
1146
|
resource = f"{method} {resource_path}"
|
|
1142
1147
|
tags = {
|
|
1143
|
-
"operation_name": "aws.httpapi",
|
|
1144
1148
|
"endpoint": path,
|
|
1145
1149
|
"http.url": http_url,
|
|
1146
1150
|
"http.method": http.get("method"),
|
|
1147
1151
|
"http.protocol": http.get("protocol"),
|
|
1148
1152
|
"http.source_ip": http.get("sourceIp"),
|
|
1149
|
-
"http.
|
|
1153
|
+
"http.useragent": http.get("userAgent"),
|
|
1150
1154
|
"resource_names": resource,
|
|
1151
1155
|
"request_id": context.aws_request_id,
|
|
1152
1156
|
"apiid": api_id,
|
|
@@ -1167,10 +1171,11 @@ def create_inferred_span_from_http_api_event(
|
|
|
1167
1171
|
Headers.Parent_Span_Finish_Time
|
|
1168
1172
|
)
|
|
1169
1173
|
span = tracer.trace(
|
|
1170
|
-
"aws.httpapi", service=service_name, resource=resource, span_type="
|
|
1174
|
+
"aws.httpapi", service=service_name, resource=resource, span_type="web"
|
|
1171
1175
|
)
|
|
1172
1176
|
if span:
|
|
1173
1177
|
span.set_tags(tags)
|
|
1178
|
+
span.set_metric(InferredSpanInfo.METRIC, 1.0)
|
|
1174
1179
|
span.start_ns = int(inferred_span_start_ns)
|
|
1175
1180
|
return span
|
|
1176
1181
|
|
|
@@ -1237,6 +1242,7 @@ def create_inferred_span_from_sqs_event(event, context):
|
|
|
1237
1242
|
)
|
|
1238
1243
|
if span:
|
|
1239
1244
|
span.set_tags(tags)
|
|
1245
|
+
span.set_metric(InferredSpanInfo.METRIC, 1.0)
|
|
1240
1246
|
span.start = start_time
|
|
1241
1247
|
if upstream_span:
|
|
1242
1248
|
span.parent_id = upstream_span.span_id
|
|
@@ -1278,6 +1284,7 @@ def create_inferred_span_from_sns_event(event, context):
|
|
|
1278
1284
|
)
|
|
1279
1285
|
if span:
|
|
1280
1286
|
span.set_tags(tags)
|
|
1287
|
+
span.set_metric(InferredSpanInfo.METRIC, 1.0)
|
|
1281
1288
|
span.start = dt.replace(tzinfo=timezone.utc).timestamp()
|
|
1282
1289
|
return span
|
|
1283
1290
|
|
|
@@ -1313,6 +1320,7 @@ def create_inferred_span_from_kinesis_event(event, context):
|
|
|
1313
1320
|
)
|
|
1314
1321
|
if span:
|
|
1315
1322
|
span.set_tags(tags)
|
|
1323
|
+
span.set_metric(InferredSpanInfo.METRIC, 1.0)
|
|
1316
1324
|
span.start = request_time_epoch
|
|
1317
1325
|
return span
|
|
1318
1326
|
|
|
@@ -1345,6 +1353,7 @@ def create_inferred_span_from_dynamodb_event(event, context):
|
|
|
1345
1353
|
)
|
|
1346
1354
|
if span:
|
|
1347
1355
|
span.set_tags(tags)
|
|
1356
|
+
span.set_metric(InferredSpanInfo.METRIC, 1.0)
|
|
1348
1357
|
|
|
1349
1358
|
span.start = int(request_time_epoch)
|
|
1350
1359
|
return span
|
|
@@ -1381,6 +1390,7 @@ def create_inferred_span_from_s3_event(event, context):
|
|
|
1381
1390
|
)
|
|
1382
1391
|
if span:
|
|
1383
1392
|
span.set_tags(tags)
|
|
1393
|
+
span.set_metric(InferredSpanInfo.METRIC, 1.0)
|
|
1384
1394
|
span.start = dt.replace(tzinfo=timezone.utc).timestamp()
|
|
1385
1395
|
return span
|
|
1386
1396
|
|
|
@@ -1421,10 +1431,11 @@ def create_inferred_span_from_eventbridge_event(event, context):
|
|
|
1421
1431
|
)
|
|
1422
1432
|
if span:
|
|
1423
1433
|
span.set_tags(tags)
|
|
1434
|
+
span.set_metric(InferredSpanInfo.METRIC, 1.0)
|
|
1424
1435
|
span.start = dt.replace(tzinfo=timezone.utc).timestamp()
|
|
1425
1436
|
|
|
1426
1437
|
# Since inferred span will later parent Lambda, preserve Lambda's current parent
|
|
1427
|
-
if dd_trace_context
|
|
1438
|
+
if dd_trace_context and getattr(dd_trace_context, "span_id", None):
|
|
1428
1439
|
span.parent_id = dd_trace_context.span_id
|
|
1429
1440
|
|
|
1430
1441
|
return span
|
|
@@ -1512,6 +1523,7 @@ class InferredSpanInfo(object):
|
|
|
1512
1523
|
BASE_NAME = "_inferred_span"
|
|
1513
1524
|
SYNCHRONICITY = f"{BASE_NAME}.synchronicity"
|
|
1514
1525
|
TAG_SOURCE = f"{BASE_NAME}.tag_source"
|
|
1526
|
+
METRIC = f"_dd.{BASE_NAME}"
|
|
1515
1527
|
|
|
1516
1528
|
@staticmethod
|
|
1517
1529
|
def set_tags(
|
datadog_lambda/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "8.
|
|
1
|
+
__version__ = "8.121.0"
|
datadog_lambda/wrapper.py
CHANGED
|
@@ -346,8 +346,16 @@ class _LambdaDecorator(object):
|
|
|
346
346
|
if status_code:
|
|
347
347
|
self.inferred_span.set_tag("http.status_code", status_code)
|
|
348
348
|
|
|
349
|
-
if self.trigger_tags
|
|
350
|
-
self.
|
|
349
|
+
if self.trigger_tags:
|
|
350
|
+
route = self.trigger_tags.get("http.route")
|
|
351
|
+
if route:
|
|
352
|
+
self.inferred_span.set_tag("http.route", route)
|
|
353
|
+
|
|
354
|
+
event_source_arn = self.trigger_tags.get(
|
|
355
|
+
"function_trigger.event_source_arn"
|
|
356
|
+
)
|
|
357
|
+
if event_source_arn:
|
|
358
|
+
self.inferred_span.set_tag("dd_resource_key", event_source_arn)
|
|
351
359
|
|
|
352
360
|
if config.service:
|
|
353
361
|
self.inferred_span.set_tag("peer.service", config.service)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: datadog_lambda
|
|
3
|
+
Version: 8.121.0
|
|
4
|
+
Summary: The Datadog AWS Lambda Library
|
|
5
|
+
Author: Datadog, Inc.
|
|
6
|
+
Author-email: dev@datadoghq.com
|
|
7
|
+
Requires-Python: >=3.8.0,<4
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Provides-Extra: dev
|
|
16
|
+
Requires-Dist: botocore (>=1.34.0,<2.0.0) ; extra == "dev"
|
|
17
|
+
Requires-Dist: datadog (>=0.51.0,<1.0.0)
|
|
18
|
+
Requires-Dist: ddtrace (>=3.19.1,<4)
|
|
19
|
+
Requires-Dist: flake8 (>=5.0.4,<6.0.0) ; extra == "dev"
|
|
20
|
+
Requires-Dist: pytest (>=8.0.0,<9.0.0) ; extra == "dev"
|
|
21
|
+
Requires-Dist: pytest-benchmark (>=4.0,<5.0) ; extra == "dev"
|
|
22
|
+
Requires-Dist: requests (>=2.22.0,<3.0.0) ; extra == "dev"
|
|
23
|
+
Requires-Dist: ujson (>=5.9.0)
|
|
24
|
+
Requires-Dist: wrapt (>=1.11.2,<2.0.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
datadog_lambda/__init__.py,sha256=9xx1R86jNFqIMYKqjkbu0RdA940zAu0L9rGJzPJm1vs,633
|
|
2
2
|
datadog_lambda/api.py,sha256=aavYiMQ5z9NSUwyjBy4aDtfbfPCpoAXuA-xlMEPAy1o,5836
|
|
3
|
-
datadog_lambda/asm.py,sha256=
|
|
3
|
+
datadog_lambda/asm.py,sha256=aWxs3gf0Xz7ZCM3WGdK-OocSjlD7fCS_jJZu5sOeH4s,8225
|
|
4
4
|
datadog_lambda/cold_start.py,sha256=NfE4EtRUHuc2ub26U8sAwMVEDNINbw1OTh2MAklQGyk,8032
|
|
5
5
|
datadog_lambda/config.py,sha256=pvr5nrqLUErLMblB1vSAUWMIauju7kMsbZx7akO7AQM,5376
|
|
6
6
|
datadog_lambda/constants.py,sha256=0y6O9s_8RLflYR507SDMQjKmYY16tr1yi2KQuuF1GaY,1696
|
|
@@ -17,14 +17,14 @@ datadog_lambda/statsd_writer.py,sha256=wUNG8phIreNOGCc5VjYZV-FNogvKfiz9kN33QldqZ
|
|
|
17
17
|
datadog_lambda/tag_object.py,sha256=IwKXf9QNsxqP9Slt44SJPqbWQ-L6AuFptlN9Jtbh4Kg,2097
|
|
18
18
|
datadog_lambda/tags.py,sha256=wy6uH8eAGMn7cfZEdHpL9uEGoM85bVyyXhYwSQtfHHc,2532
|
|
19
19
|
datadog_lambda/thread_stats_writer.py,sha256=VfD6G65zNHDA0nABhGOO0it7yqvn-p6ereQ329DA7r8,2894
|
|
20
|
-
datadog_lambda/tracing.py,sha256=
|
|
20
|
+
datadog_lambda/tracing.py,sha256=jAhhGBlDZTJb-jiwvwTeVQAEH0wENWakDlIfre3_cCo,58507
|
|
21
21
|
datadog_lambda/trigger.py,sha256=bkNe77eOVuYc8kyH7KKYlsvHZfC-NXyl9GLqJ8Qaky8,14628
|
|
22
|
-
datadog_lambda/version.py,sha256=
|
|
23
|
-
datadog_lambda/wrapper.py,sha256=
|
|
22
|
+
datadog_lambda/version.py,sha256=B_xVOhS32bp0A9fxp8_vn516Yjhj3K3lYaC2MKtyVnQ,24
|
|
23
|
+
datadog_lambda/wrapper.py,sha256=RO-Fk9izWTuP7H9QCXeHs9B0weDkPy1kvSZ5YsMLV-Y,15649
|
|
24
24
|
datadog_lambda/xray.py,sha256=jvA4Fk76PLMgsjUoUZ7gp2otv53hFt39Nvso1ZNaivg,3749
|
|
25
|
-
datadog_lambda-8.
|
|
26
|
-
datadog_lambda-8.
|
|
27
|
-
datadog_lambda-8.
|
|
28
|
-
datadog_lambda-8.
|
|
29
|
-
datadog_lambda-8.
|
|
30
|
-
datadog_lambda-8.
|
|
25
|
+
datadog_lambda-8.121.0.dist-info/LICENSE,sha256=4yQmjpKp1MKL7DdRDPVHkKYc2W0aezm5SIDske8oAdM,11379
|
|
26
|
+
datadog_lambda-8.121.0.dist-info/LICENSE-3rdparty.csv,sha256=9CDAR1GKawwTbZkqt1RP0uwEcaRM3RhOeTB5tWXr8Ts,1381
|
|
27
|
+
datadog_lambda-8.121.0.dist-info/METADATA,sha256=eicMuG6GQ4FbSUWAvgKV3YRlqtpwTraRUrq1xS4CLnc,994
|
|
28
|
+
datadog_lambda-8.121.0.dist-info/NOTICE,sha256=Jue-d8mQ1ENIHDZdYc2-X8mVYtScXb8pzF1pTLN-kRc,141
|
|
29
|
+
datadog_lambda-8.121.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
30
|
+
datadog_lambda-8.121.0.dist-info/RECORD,,
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: datadog_lambda
|
|
3
|
-
Version: 8.120.0
|
|
4
|
-
Summary: The Datadog AWS Lambda Library
|
|
5
|
-
Home-page: https://github.com/DataDog/datadog-lambda-python
|
|
6
|
-
License: Apache-2.0
|
|
7
|
-
Keywords: datadog,aws,lambda,layer
|
|
8
|
-
Author: Datadog, Inc.
|
|
9
|
-
Author-email: dev@datadoghq.com
|
|
10
|
-
Requires-Python: >=3.8.0,<4
|
|
11
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
|
-
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
-
Provides-Extra: dev
|
|
21
|
-
Requires-Dist: botocore (>=1.34.0,<2.0.0) ; extra == "dev"
|
|
22
|
-
Requires-Dist: datadog (>=0.51.0,<1.0.0)
|
|
23
|
-
Requires-Dist: ddtrace (>=3.16.2,<3.19.0)
|
|
24
|
-
Requires-Dist: flake8 (>=5.0.4,<6.0.0) ; extra == "dev"
|
|
25
|
-
Requires-Dist: pytest (>=8.0.0,<9.0.0) ; extra == "dev"
|
|
26
|
-
Requires-Dist: pytest-benchmark (>=4.0,<5.0) ; extra == "dev"
|
|
27
|
-
Requires-Dist: requests (>=2.22.0,<3.0.0) ; extra == "dev"
|
|
28
|
-
Requires-Dist: ujson (>=5.9.0)
|
|
29
|
-
Requires-Dist: wrapt (>=1.11.2,<2.0.0)
|
|
30
|
-
Project-URL: Repository, https://github.com/DataDog/datadog-lambda-python
|
|
31
|
-
Description-Content-Type: text/markdown
|
|
32
|
-
|
|
33
|
-
# datadog-lambda-python
|
|
34
|
-
|
|
35
|
-

|
|
36
|
-
[](https://pypi.org/project/datadog-lambda/)
|
|
37
|
-

|
|
38
|
-
[](https://chat.datadoghq.com/)
|
|
39
|
-
[](https://github.com/DataDog/datadog-lambda-python/blob/main/LICENSE)
|
|
40
|
-
|
|
41
|
-
Datadog Lambda Library for Python (3.8, 3.9, 3.10, 3.11, 3.12, 3.13, and 3.14) 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.
|
|
42
|
-
|
|
43
|
-
## Installation
|
|
44
|
-
|
|
45
|
-
Follow the [installation instructions](https://docs.datadoghq.com/serverless/installation/python/), and view your function's enhanced metrics, traces and logs in Datadog.
|
|
46
|
-
|
|
47
|
-
## Configuration
|
|
48
|
-
|
|
49
|
-
Follow the [configuration instructions](https://docs.datadoghq.com/serverless/configuration) to tag your telemetry, capture request/response payloads, filter or scrub sensitive information from logs or traces, and more.
|
|
50
|
-
|
|
51
|
-
For additional tracing configuration options, check out the [official documentation for Datadog trace client](https://ddtrace.readthedocs.io/en/stable/configuration.html).
|
|
52
|
-
|
|
53
|
-
Besides the environment variables supported by dd-trace-py, the datadog-lambda-python library added following environment variables.
|
|
54
|
-
|
|
55
|
-
| Environment Variables | Description | Default Value |
|
|
56
|
-
| -------------------- | ------------ | ------------- |
|
|
57
|
-
| 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` |
|
|
58
|
-
| 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` |
|
|
59
|
-
| 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` |
|
|
60
|
-
| 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` |
|
|
61
|
-
| 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` |
|
|
62
|
-
| DD_CAPTURE_LAMBDA_PAYLOAD | [Captures incoming and outgoing AWS Lambda payloads][1] in the Datadog APM spans for Lambda invocations. | `false` |
|
|
63
|
-
| DD_CAPTURE_LAMBDA_PAYLOAD_MAX_DEPTH | Determines the level of detail captured from AWS Lambda payloads, which are then assigned as tags for the `aws.lambda` span. It specifies the nesting depth of the JSON payload structure to process. Once the specified maximum depth is reached, the tag's value is set to the stringified value of any nested elements beyond this level. <br> For example, given the input payload: <pre>{<br> "lv1" : {<br> "lv2": {<br> "lv3": "val"<br> }<br> }<br>}</pre> If the depth is set to `2`, the resulting tag's key is set to `function.request.lv1.lv2` and the value is `{\"lv3\": \"val\"}`. <br> If the depth is set to `0`, the resulting tag's key is set to `function.request` and value is `{\"lv1\":{\"lv2\":{\"lv3\": \"val\"}}}` | `10` |
|
|
64
|
-
| DD_EXCEPTION_REPLAY_ENABLED | When set to `true`, the Lambda will run with Error Tracking Exception Replay enabled, capturing local variables. | `false` |
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
## Opening Issues
|
|
68
|
-
|
|
69
|
-
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.
|
|
70
|
-
|
|
71
|
-
When opening an issue, include the Datadog Lambda Library version, Python version, and stack trace if available. In addition, include the steps to reproduce when appropriate.
|
|
72
|
-
|
|
73
|
-
You can also open an issue for a feature request.
|
|
74
|
-
|
|
75
|
-
## Lambda Profiling Beta
|
|
76
|
-
|
|
77
|
-
Datadog's [Continuous Profiler](https://www.datadoghq.com/product/code-profiling/) is now available in beta for Python in version 4.62.0 and layer version 62 and above. This optional feature is enabled by setting the `DD_PROFILING_ENABLED` environment variable to `true`. During the beta period, profiling is available at no additional cost.
|
|
78
|
-
|
|
79
|
-
The Continuous Profiler works by spawning a thread which periodically wakes up and takes a snapshot of the CPU and Heap of all running python code. This can include the profiler itself. If you want the Profiler to ignore itself, set `DD_PROFILING_IGNORE_PROFILER` to `true`.
|
|
80
|
-
|
|
81
|
-
## Major Version Notes
|
|
82
|
-
|
|
83
|
-
### 6.x / Layer version 95+
|
|
84
|
-
- The release changed how Lambda's traceID is hashed if the incoming payload contains Step Functions context object. This change only affects those who uses inject Step Functions context object into Lambda payload.
|
|
85
|
-
|
|
86
|
-
### 5.x / Layer version 86+
|
|
87
|
-
- Python3.7 support has been [deprecated](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) by AWS, and support removed from this library.
|
|
88
|
-
|
|
89
|
-
### 4.x / Layer version 61+
|
|
90
|
-
|
|
91
|
-
- Python3.6 support has been [deprecated](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) by AWS, and support removed from this library.
|
|
92
|
-
- `dd-trace` upgraded from 0.61 to 1.4, full release notes are available [here](https://ddtrace.readthedocs.io/en/stable/release_notes.html#v1-0-0)
|
|
93
|
-
- `get_correlation_ids()` has been changed to `get_log_correlation_context()`, which now returns a dictionary containing the active `span_id`, `trace_id`, as well as `service` and `env`.
|
|
94
|
-
|
|
95
|
-
## Contributing
|
|
96
|
-
|
|
97
|
-
If you find an issue with this package and have a fix, please feel free to open a pull request following the [procedures](CONTRIBUTING.md).
|
|
98
|
-
|
|
99
|
-
## Community
|
|
100
|
-
|
|
101
|
-
For product feedback and questions, join the `#serverless` channel in the [Datadog community on Slack](https://chat.datadoghq.com/).
|
|
102
|
-
|
|
103
|
-
## License
|
|
104
|
-
|
|
105
|
-
Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
106
|
-
|
|
107
|
-
This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2019 Datadog, Inc.
|
|
108
|
-
|
|
109
|
-
[1]: https://www.datadoghq.com/blog/troubleshoot-lambda-function-request-response-payloads/
|
|
110
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|