Skip to content
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

Feature/syslog structured data #122

Merged
merged 7 commits into from
Jun 3, 2024

Conversation

sametd
Copy link
Member

@sametd sametd commented May 28, 2024

This PR implements the "origin" component of the syslog structural data as described in RFC5424, specifically in sections 6.2 and 7.2 (RFC5424 Section 7.2). Implementation also ensures that the current functionality remains unaffected if the newly introduced variables are not set. I am tagging @tlmquintino here as he may also want to take a look at this implementation.

Note: This is not a full implementation of structural data of the syslog, only implements the bits that necessary to add logserver-compatible logging. Logserver repo can be found here

@sametd sametd requested review from pmaciel and danovaro May 28, 2024 13:54
@jameshawkes jameshawkes added the approved-for-ci Approved for CI run label May 28, 2024
@codecov-commenter
Copy link

codecov-commenter commented May 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.11%. Comparing base (3a95f91) to head (a726bd8).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #122      +/-   ##
===========================================
+ Coverage    61.98%   62.11%   +0.13%     
===========================================
  Files          900      901       +1     
  Lines        49799    49850      +51     
  Branches      3745     3749       +4     
===========================================
+ Hits         30866    30966     +100     
+ Misses       18933    18884      -49     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pmaciel pmaciel removed their request for review May 28, 2024 14:17
@pmaciel
Copy link
Member

pmaciel commented May 28, 2024

Hi @sametd, I'm not aware of why this PR is needed, so I'm not really qualified for a review. It looks good though! :-)

@github-actions github-actions bot removed the approved-for-ci Approved for CI run label Jun 2, 2024
@sametd sametd added the approved-for-ci Approved for CI run label Jun 2, 2024
@@ -99,6 +99,11 @@ class SysLog {
return s;
}

/// Optional fields for structured data (RFC 5424 section 6.3)
void software(const std::string& software) { software_ = software; }
Copy link
Contributor

Choose a reason for hiding this comment

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

Where are these being set?

Copy link
Member Author

Choose a reason for hiding this comment

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

These are the keywords that belongs to origin part of the syslog structural data described in RFC5424 -> https://datatracker.ietf.org/doc/html/rfc5424#section-7.2

@simondsmart
Copy link
Contributor

Looks uncontroversial. Why is there a failing test?

Copy link
Contributor

@simondsmart simondsmart left a comment

Choose a reason for hiding this comment

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

Looks good to me. Once the CI is happy, we should be good to go.

@jameshawkes jameshawkes merged commit 5f08ff0 into ecmwf:develop Jun 3, 2024
214 of 215 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants