Skip to content
Merged
Changes from 2 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
13 changes: 7 additions & 6 deletions osprey_worker/src/osprey/engine/executor/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,18 +408,19 @@ def execute(

effects = context.get_effects()

total_errors = len(error_infos)
unexpected_errors = len(unexpected_error_infos)
actionable_error_infos = [error_info for error_info in error_infos if not _is_spammy_exception(error_info.error)]
has_effects = len(effects) > 0
has_actionable_errors = len(actionable_error_infos) > 0
action_tags = [
f'action:{action.action_name}',
f'had_errors:{total_errors > 0}',
f'had_unexpected_errors:{unexpected_errors > 0}',
f'had_actionable_errors:{has_actionable_errors}',
f'had_effects:{has_effects}',
]
metrics.increment('osprey.action_health', tags=action_tags)
if total_errors > 0:
metrics.histogram('osprey.action_error_count', total_errors, tags=[f'action:{action.action_name}'])
if has_actionable_errors:
metrics.histogram(
'osprey.action_error_count', len(actionable_error_infos), tags=[f'action:{action.action_name}']
)

result = ExecutionResult(
extracted_features=context.get_extracted_features(),
Expand Down
Loading