8000 Fix flushing in Exception Replay by nhulston · Pull Request #601 · DataDog/datadog-lambda-python · GitHub
[go: up one dir, main page]

Skip to content

Fix flushing in Exception Replay #601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions datadog_lambda/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
).lower() in ("true", "1")
if exception_replay_env_var:
from ddtrace.debugging._exception.replay import SpanExceptionHandler
from ddtrace.debugging._uploader import LogsIntakeUploaderV1

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -405,6 +406,10 @@ def _after(self, event, context):
if llmobs_env_var:
LLMObs.flush()

# Flush exception replay
if exception_replay_env_var:
LogsIntakeUploaderV1._instance.periodic()

if self.encode_authorizer_context and is_authorizer_response(self.response):
self._inject_authorizer_span_headers(
event.get("requestContext", {}).get("requestId")
Expand Down
Loading
0