refactor(chalice): optimised error details query (#2136)

This commit is contained in:
Kraiem Taha Yassine 2024-04-25 13:09:51 +02:00 committed by GitHub
parent 33ef2c06b3
commit 91fbaeeef6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View file

@ -152,8 +152,7 @@ def get_details(project_id, error_id, user_id, **data):
INNER JOIN (SELECT MAX(timestamp) AS last_occurrence,
MIN(timestamp) AS first_occurrence
FROM events.errors
WHERE error_id = %(error_id)s
GROUP BY error_id) AS time_details ON (TRUE)
WHERE error_id = %(error_id)s) AS time_details ON (TRUE)
INNER JOIN (SELECT session_id AS last_session_id,
coalesce(custom_tags, '[]')::jsonb AS custom_tags
FROM events.errors

View file

@ -159,8 +159,7 @@ def get_details(project_id, error_id, user_id, **data):
INNER JOIN (SELECT MAX(timestamp) AS last_occurrence,
MIN(timestamp) AS first_occurrence
FROM events.errors
WHERE error_id = %(error_id)s
GROUP BY error_id) AS time_details ON (TRUE)
WHERE error_id = %(error_id)s) AS time_details ON (TRUE)
INNER JOIN (SELECT session_id AS last_session_id,
coalesce(custom_tags, '[]')::jsonb AS custom_tags
FROM events.errors