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 : Add otel logging support for systemd_journald receiver. #1872

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

franciscovalentecastro
Copy link
Contributor

@franciscovalentecastro franciscovalentecastro commented Feb 3, 2025

Description

Add otel logging support for systemd_journald receiver.

Related issue

b/394593541

How has this been tested?

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-otel-logging-systemd branch from 6e369a7 to c731e31 Compare February 5, 2025 21:36
@franciscovalentecastro franciscovalentecastro changed the title [Draft] Add otel logging support for systemd_journald receiver. confgenerator : Add otel logging support for systemd_journald receiver. Feb 5, 2025
@franciscovalentecastro franciscovalentecastro marked this pull request as ready for review February 5, 2025 21:36
@@ -682,6 +682,61 @@ func (r LoggingReceiverSystemd) Components(ctx context.Context, tag string) []fl
return input
}

func (r LoggingReceiverSystemd) Pipelines(ctx context.Context) ([]otel.ReceiverPipeline, error) {
operators := []map[string]any{}
operators = append(operators, map[string]any{
Copy link
Member

Choose a reason for hiding this comment

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

I think we should use ModifyFields here instead of using the deprecated operators option to do these manipulations.

})
}

func testSystemdLog(t *testing.T, otel bool) {
Copy link
Member

Choose a reason for hiding this comment

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

I'd like to see this actually test the schema of the log entries, instead of just testing that one exists.

Probably that means we should send a particular canary message to journald and then check how it is represented in Cloud Logging.

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.

2 participants