Skip to content

Commit cddc194

Browse files
committed
fix httpapi finish time case
1 parent efce8eb commit cddc194

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
@@ -863,7 +863,7 @@ def create_inferred_span_from_http_api_event(event, context):
863863
injected_authorizer_data.get(Headers.Parent_Span_Finish_Time)
864864
)
865865
finish_time_s = (
866-
start_time_ns / 1000
866+
start_time_ns / 1e9
867867
) # no integrationLatency info in this case
868868
upstream_authorizer_span = insert_upstream_authorizer_span(
869869
args, tags, start_time_ns, finish_time_s

tests/event_samples/authorizer-request-api-gateway-v2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"apiId": "amddr1rix9",
2525
"authorizer": {
2626
"lambda": {
27-
"_datadog": "eyJ4LWRhdGFkb2ctdHJhY2UtaWQiOiAiMTQzNTY5ODM2MTk4NTI5MzMzNTQiLCAieC1kYXRhZG9nLXBhcmVudC1pZCI6ICIxMjY1ODYyMTA4MzUwNTQxMzgwOSIsICJ4LWRhdGFkb2ctc2FtcGxpbmctcHJpb3JpdHkiOiAiMSIsICJ4LWRhdGFkb2ctcGFyZW50LXNwYW4tZmluaXNoLXRpbWUiOiAxNjY0MjI4NjM5NTMzLjc3NTQsICJ4LWRhdGFkb2ctYXV0aG9yaXppbmctcmVxdWVzdGlkIjogImFiYzEyMyJ9",
27+
"_datadog": "eyJ4LWRhdGFkb2ctdHJhY2UtaWQiOiAiMTQzNTY5ODM2MTk4NTI5MzMzNTQiLCAieC1kYXRhZG9nLXBhcmVudC1pZCI6ICIxMjY1ODYyMTA4MzUwNTQxMzgwOSIsICJ4LWRhdGFkb2ctc2FtcGxpbmctcHJpb3JpdHkiOiAiMSIsICJ4LWRhdGFkb2ctcGFyZW50LXNwYW4tZmluaXNoLXRpbWUiOiAxNjY0MjI4NjM5NTMzNzc1NDAwLCAieC1kYXRhZG9nLWF1dGhvcml6aW5nLXJlcXVlc3RpZCI6ICJhYmMxMjMifQ==",
2828
"scope": "this is just a string"
2929
}
3030
},

tests/test_tracing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ def test_create_inferred_span_from_authorizer_token_api_gateway_v2_cached_event(
630630

631631
def test_create_inferred_span_from_authorizer_request_api_gateway_v2_event(self):
632632
event_sample_source = "authorizer-request-api-gateway-v2"
633-
finish_time = 1664228639.533 # use the injected parent span finish time as an approximation
633+
finish_time = 1664228639.5337753 # use the injected parent span finish time as an approximation
634634
span = self._authorizer_span_testing_items(event_sample_source, finish_time)
635635
self._basic_common_checks(span, "aws.httpapi")
636636

0 commit comments

Comments
 (0)