Skip to content

Commit 246f2b4

Browse files
committed
black
1 parent 05c1aa5 commit 246f2b4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

datadog_lambda/tracing.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ def extract_context_from_kinesis_event(event, lambda_context):
387387

388388
def _deterministic_sha256_hash(s: str, part: str) -> int:
389389
import hashlib
390+
390391
sha256_hash = hashlib.sha256(s.encode()).hexdigest()
391392
# First two chars is '0b'. zfill to ensure 256 bits, but we only care about the first 128 bits
392393
binary_hash = bin(int(sha256_hash, 16))[2:].zfill(256)

datadog_lambda/wrapper.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ def __call__(self, event, context, **kwargs):
245245
except Exception:
246246
if not should_use_extension:
247247
from datadog_lambda.metric import submit_invocations_metric
248+
248249
submit_invocations_metric(context)
249250

250251
if self.span:
@@ -282,9 +283,10 @@ def _before(self, event, context):
282283
try:
283284
self.response = None
284285
set_cold_start(init_timestamp_ns)
285-
286+
286287
if not should_use_extension:
287288
from datadog_lambda.metric import submit_invocations_metric
289+
288290
submit_invocations_metric(context)
289291

290292
self.trigger_tags = extract_trigger_tags(event, context)
@@ -386,6 +388,7 @@ def _after(self, event, context):
386388

387389
if not self.flush_to_log or should_use_extension:
388390
from datadog_lambda.metric import flush_stats
391+
389392
flush_stats(context)
390393
if should_use_extension and self.local_testing_mode:
391394
# when testing locally, the extension does not know when an

0 commit comments

Comments
 (0)