StackStorm / StackStorm/st2

JsonFormatter logging does not include liveaction_db results

Open
#6,027 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

SUMMARY

When using JsonFormatter on the actionrunner, liveaction_db is stripped from the log entry as it is not properly JSON formatted

STACKSTORM VERSION

Paste the output of st2 --version: st2 3.8.0, on Python 3.6.8

OS, environment, install method

Post what OS you are running this on, along with any other relevant information/

Oracle Linux Server 7.9 installed with packages

Steps to reproduce the problem

Log Audits as JsonFormatter, run an action that would usually fail

Expected Results

The liveaction_db results should've been appended to the log entry

Actual Results

When the AUDIT entry for a failed actionrunner job is written to log, the message only contains "Liveaction completed".

{"asctime": "2023-09-28 23:00:18,861", "thread": 140539033242664, "levelname": "AUDIT", "module": "base", "message": "Liveaction completed"}

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 with the actionrunner's JsonFormatter audit logging path and reproduce a failed action using the steps in the issue. Trace how the liveaction_db results are handled when the AUDIT entry is serialized, then verify the JSON log includes those results alongside the existing message.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.