Mirror of https://github.com/roostorg/osprey github.com/roostorg/osprey
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add per-action health metrics to executor (#191)

authored by

Leon Shi and committed by
GitHub
bd2fe922 8f64ab5e

+16 -1
+16 -1
osprey_worker/src/osprey/engine/executor/executor.py
··· 406 406 ] 407 407 ) 408 408 409 + effects = context.get_effects() 410 + 411 + total_errors = len(error_infos) 412 + unexpected_errors = len(unexpected_error_infos) 413 + has_effects = len(effects) > 0 414 + action_tags = [ 415 + f'action:{action.action_name}', 416 + f'had_errors:{total_errors > 0}', 417 + f'had_unexpected_errors:{unexpected_errors > 0}', 418 + f'had_effects:{has_effects}', 419 + ] 420 + metrics.increment('osprey.action_health', tags=action_tags) 421 + if total_errors > 0: 422 + metrics.histogram('osprey.action_error_count', total_errors, tags=[f'action:{action.action_name}']) 423 + 409 424 result = ExecutionResult( 410 425 extracted_features=context.get_extracted_features(), 411 426 action=action, 412 - effects=context.get_effects(), 427 + effects=effects, 413 428 validator_results=validator_results, 414 429 error_infos=unexpected_error_infos, 415 430 sample_rate=sample_rate,