StackStorm / StackStorm/st2

Include rule name in St2Timer logs

Open
#2,961 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

Right now we have to work backwards from the times to identify a particular rule. This is non-trivial with a lot of cron rules in StackStorm.

Here's a couple example logs from our dev instance:

2016-10-18 00:31:00,001 140302986729904 WARNING base [-] Execution of job "St2Timer._emit_trigger_instance (trigger: cron[day='*', day_of_week='*', hour='*', minute='31'], next run at: 2016-10-18 00:31:00 CDT)" skipped: maximum number of running instances reached (1)
2016-10-18 01:18:40,620 140302986731344 WARNING base [-] Run time of job "St2Timer._emit_trigger_instance (trigger: cron[day='*', day_of_week='*', hour='22', minute='5'], next run at: 2016-10-18 22:05:00 CDT)" was missed by 2 days, 3:13:40.620955

It would also be great if these were logged as ERRORs instead of WARNINGs.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at St2Timer._emit_trigger_instance and trace where the example skipped and missed-run messages are emitted. Reproduce the timer logging behavior, then verify that the relevant messages identify the rule name and use ERROR rather than WARNING severity.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, observability
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.