Skip to content

Adds lifecycle logger to log start, complete, and failure logs#1745

Merged
micahwoodard merged 11 commits into
developfrom
feat-lifecycle-logs
May 28, 2026
Merged

Adds lifecycle logger to log start, complete, and failure logs#1745
micahwoodard merged 11 commits into
developfrom
feat-lifecycle-logs

Conversation

@micahwoodard
Copy link
Copy Markdown
Collaborator

@micahwoodard micahwoodard commented May 26, 2026

Describe changes:

Adds lifecycle logger to log start, complete, and failure logs using the aind-log-utils formatter. This will create a log file in a default folder of Documents/lifecycle_logs to be picked up by grafana alloy. Start log will emit after user presses start and acquisition name is defined and stop log will happen after user saves. Final logs will look like

{"timestamp": "2026-05-27T15:02:30.306808Z", "level": "INFO", "message": "Session started.", "subject_id": "0", "acquisition_name": "behavior_0_2026-05-27_08-02-30", "event_type": "stage_start"}
{"timestamp": "2026-05-27T15:03:02.180110Z", "level": "INFO", "message": "Session ended.", "subject_id": "0", "acquisition_name": "behavior_0_2026-05-27_08-02-30", "event_type": "stage_complete"}

What issues or discussions does this update address?

Describe the expected change in behavior from the perspective of the experimenter

  • None

Describe any manual update steps for task computers

  • Need to set up grafana alloy on the frg computers to pick up logs. This can be done asynchronously.

Was this update tested in 446/447?

  • 446/7

Does this update impact downstream processing by adding new saved files, or changing their format? If so, have you documented changes?

  • does not impact data but log will be used for session tracking. Coordinating with SciComp

…d-log-utils format for grafana alloy to pick up
@micahwoodard micahwoodard marked this pull request as draft May 26, 2026 17:19
@micahwoodard micahwoodard marked this pull request as ready for review May 27, 2026 15:16
Copy link
Copy Markdown
Collaborator

@arielleleon arielleleon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! It's great to see the log-schema dependency added

@micahwoodard
Copy link
Copy Markdown
Collaborator Author

okay I will merge and work with @jessy-liao to set up grafana alloy to rigs!

@micahwoodard micahwoodard merged commit a063c60 into develop May 28, 2026
@micahwoodard micahwoodard deleted the feat-lifecycle-logs branch May 28, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants