Skip to content

[Logging] Add structured log context to Triage #4787

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2025

Conversation

ViniciustCosta
Copy link
Collaborator

@ViniciustCosta ViniciustCosta commented May 7, 2025

Description

This adds structured logging to the triage job.

To enable this, the triage code was instrumented with the cron log context and with the testcase-based context, which wraps each triage execution for a given testcase. To avoid indenting the whole function, a new private method was created for triaging a single testcase.

Note: grouper will be instrumented in a next PR after #4781 is merged.

Test

  • Running the cronjob locally with the debugger (link to logs).
    image

@ViniciustCosta ViniciustCosta marked this pull request as ready for review May 7, 2025 20:07
Copy link
Contributor

@javanlacerda javanlacerda left a comment

Choose a reason for hiding this comment

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

LGTM. just a question, is triage being called through the common task flow? I'm wondering if we should add the task context as well.

@ViniciustCosta
Copy link
Collaborator Author

LGTM. just a question, is triage being called through the common task flow? I'm wondering if we should add the task context as well.

Triage is executed as a cronjob, so I added the cron-related context (which logs the task name/ID). The entry points for the cronjobs is already instrumented setting the env vars with this information (#4781).

Copy link
Collaborator

@vitorguidi vitorguidi left a comment

Choose a reason for hiding this comment

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

lgtm

@ViniciustCosta ViniciustCosta merged commit feccb11 into master May 13, 2025
7 checks passed
@ViniciustCosta ViniciustCosta deleted the feat/add_structured_logs_triage branch May 13, 2025 15:48
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.

3 participants