mirror of
https://github.com/suitenumerique/meet.git
synced 2026-07-26 11:58:53 +00:00
✨(summary) report exception type in failure analytics
We know capture also the exception type that was raised in failure analytics to provide more insights about what happened.
This commit is contained in:
@@ -8,9 +8,15 @@ and this project adheres to
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- ✨(summary) report exception type in failure analytics
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
|
||||||
- 🐛(transcription) fix silent bug in speaker assignment
|
- 🐛(transcription) fix silent bug in speaker assignment
|
||||||
|
- 🐛(summary) extend tasks auto retry logic
|
||||||
|
- 🐛(summary) properly detect when failure webhook should be sent
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
|||||||
@@ -202,13 +202,16 @@ class MetadataManager:
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
def capture(self, task_id, event_name):
|
def capture(self, task_id, event_name, extra_properties=None):
|
||||||
"""Capture analytics event with task metadata and clean up."""
|
"""Capture analytics event with task metadata and clean up."""
|
||||||
if self._is_disabled or not self.has_task_id(task_id):
|
if self._is_disabled or not self.has_task_id(task_id):
|
||||||
return
|
return
|
||||||
|
|
||||||
metadata = self._get_metadata(task_id)
|
metadata = self._get_metadata(task_id)
|
||||||
|
|
||||||
|
if extra_properties:
|
||||||
|
metadata = {**metadata, **extra_properties}
|
||||||
|
|
||||||
if "start_time" in metadata:
|
if "start_time" in metadata:
|
||||||
metadata["execution_time"] = round(time.time() - metadata["start_time"], 2)
|
metadata["execution_time"] = round(time.time() - metadata["start_time"], 2)
|
||||||
del metadata["start_time"]
|
del metadata["start_time"]
|
||||||
|
|||||||
@@ -612,6 +612,7 @@ def handle_transcribe_v2_failed(
|
|||||||
metadata_manager.capture(
|
metadata_manager.capture(
|
||||||
task_id,
|
task_id,
|
||||||
settings.posthog_transcript_failure,
|
settings.posthog_transcript_failure,
|
||||||
|
{"exception_type": type(exception).__name__},
|
||||||
)
|
)
|
||||||
call_webhook_v2_task.apply_async(
|
call_webhook_v2_task.apply_async(
|
||||||
args=[
|
args=[
|
||||||
@@ -720,6 +721,7 @@ def handle_summarize_v2_failed(
|
|||||||
metadata_manager.capture(
|
metadata_manager.capture(
|
||||||
task_id,
|
task_id,
|
||||||
settings.posthog_summary_failure,
|
settings.posthog_summary_failure,
|
||||||
|
{"exception_type": type(exception).__name__},
|
||||||
)
|
)
|
||||||
call_webhook_v2_task.apply_async(
|
call_webhook_v2_task.apply_async(
|
||||||
args=[
|
args=[
|
||||||
|
|||||||
Reference in New Issue
Block a user