8000 fix typo stringValue (#108) · DataDog/datadog-lambda-python@e2c6b66 · GitHub
[go: up one dir, main page]

Skip to content

Commit e2c6b66

Browse files
authored
fix typo stringValue (#108)
1 parent a90a045 commit e2c6b66

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

datadog_lambda/tracing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def extract_context_from_sqs_event_or_context(event, lambda_context):
139139
try:
140140
first_record = event["Records"][0]
141141
msg_attributes = first_record.get("messageAttributes", {})
142-
dd_json_data = msg_attributes.get("_datadog", {}).get("StringValue", r"{}")
142+
dd_json_data = msg_attributes.get("_datadog", {}).get("stringValue", r"{}")
143143
dd_data = json.loads(dd_json_data)
144144
trace_id = dd_data.get(TraceHeader.TRACE_ID)
145145
parent_id = dd_data.get(TraceHeader.PARENT_ID)

tests/integration/input_events/sqs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"messageAttributes": {
1414
"_datadog": {
15-
"StringValue": "{\"x-datadog-trace-id\":\"666\",\"x-datadog-parent-id\":\"777\",\"x-datadog-sampling-priority\":\"1\"}"
15+
"stringValue": "{\"x-datadog-trace-id\":\"666\",\"x-datadog-parent-id\":\"777\",\"x-datadog-sampling-priority\":\"1\"}"
1616
}
1717
},
1818
"md5OfBody": "e4e68fb7bd0e697a0ae8f1bb342846b3",

tests/test_tracing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def test_with_sqs_distributed_datadog_trace_data(self):
166166
},
167167
"messageAttributes": {
168168
"_datadog": {
169-
"StringValue": json.dumps(
169+
"stringValue": json.dumps(
170170
{
171171
TraceHeader.TRACE_ID: "123",
172172
TraceHeader.PARENT_ID: "321",

0 commit comments

Comments
 (0)
0