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

confgenerator: Structured Ops Agent Health Logs #1290

Merged
merged 40 commits into from
Jul 10, 2023

Conversation

franciscovalentecastro
Copy link
Contributor

@franciscovalentecastro franciscovalentecastro commented Jun 16, 2023

Description

This change creates the confgenerator/self_logs.go as a first step to organize all self logs into the same structured format. This is PR only applies the format for health-checks.log and the followup #1300 will enforce the format to a sample of logging-module.log logs.

Every Ops Agent Health Logs will appear under the log name ops-agent-health and should have the following fields :

  1. Inherited Fields

  2. Required Fields

    • Code : A code to uniquely identify signals.
    • Agent : Description of agent collecting telemetry.
    • Message : A full description of the signal.
    • LogSeverity : A description of how impactful the problem is.
    • SchemaVersion : The version of the current schema used for the Health Signal.
  3. Optional Fields

    • SourceLocation : Location in source code of agent where the signal originated.

Google Cloud Logging LogEntry Output Format :

Related issue

b/287980723

How has this been tested?

Some details about the testing of this PR :

  • Health Checks unit tests passed.
  • Improved integration test TestLoggingSelfLogs.

Checklist:

  • Unit tests
    • Unit tests do not apply.
    • Unit tests have been added/modified and passed for this PR.
  • Integration tests
    • Integration tests do not apply.
    • Integration tests have been added/modified and passed for this PR.
  • Documentation
    • This PR introduces no user visible changes.
    • This PR introduces user visible changes and the corresponding documentation change has been made.
  • Minor version bump
    • This PR introduces no new features.
    • This PR introduces new features, and there is a separate PR to bump the minor version since the last release already.
    • This PR bumps the version.

@franciscovalentecastro franciscovalentecastro force-pushed the fcovalente-structured-self-logs branch from b117bbb to 2541c73 Compare June 19, 2023 17:40
@franciscovalentecastro franciscovalentecastro changed the title [Draft] Create self_logs.go confgenerator: Structured Ops Agent Health Logs Jun 19, 2023
@rafaelwestphal rafaelwestphal self-requested a review June 19, 2023 19:48
@franciscovalentecastro franciscovalentecastro force-pushed the fcovalente-structured-self-logs branch from 25c01e2 to fed3c40 Compare June 20, 2023 21:08
@franciscovalentecastro franciscovalentecastro force-pushed the fcovalente-structured-self-logs branch 2 times, most recently from b1ba08c to 0d6aca7 Compare June 29, 2023 14:34
@franciscovalentecastro franciscovalentecastro marked this pull request as ready for review June 29, 2023 14:49
cmd/ops_agent_windows/run_windows.go Outdated Show resolved Hide resolved
@franciscovalentecastro franciscovalentecastro requested a review from a team June 29, 2023 18:47
confgenerator/self_logs.go Outdated Show resolved Hide resolved
internal/logs/logs.go Outdated Show resolved Hide resolved
integration_test/ops_agent_test.go Outdated Show resolved Hide resolved
internal/logs/logs.go Show resolved Hide resolved
internal/healthchecks/api_check.go Outdated Show resolved Hide resolved
confgenerator/self_logs.go Outdated Show resolved Hide resolved
@franciscovalentecastro franciscovalentecastro force-pushed the fcovalente-structured-self-logs branch from df75c05 to b9839ee Compare July 5, 2023 14:59
@franciscovalentecastro franciscovalentecastro force-pushed the fcovalente-structured-self-logs branch 3 times, most recently from ab14f60 to ce4dd16 Compare July 6, 2023 18:43
@franciscovalentecastro franciscovalentecastro force-pushed the fcovalente-structured-self-logs branch from ce4dd16 to 8260440 Compare July 7, 2023 19:14
@franciscovalentecastro franciscovalentecastro dismissed jefferbrecht’s stale review July 10, 2023 18:50

Requested changes comment addressed. Synced offline with @jefferbrec about last PR details.

@franciscovalentecastro franciscovalentecastro merged commit 2703c64 into master Jul 10, 2023
@franciscovalentecastro franciscovalentecastro deleted the fcovalente-structured-self-logs branch July 10, 2023 19:50
franciscovalentecastro added a commit that referenced this pull request Aug 3, 2023
This PR adds filters to sample specific logs fluent-bit self-logs and transform them into ops-agent-health logs, following the Structured Ops Agent Health Logs format(#1290). The following fluent-bit logs are sampled :

- Code : LogPipelineErr, Match : [error] [lib] backend failed
- Code : LogParseErr, Match : [error] [parser] cannot parse
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