8000 Add the otelcol tcplog receiver by nosammai · Pull Request #2701 · grafana/alloy · GitHub
[go: up one dir, main page]

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

Add the otelcol tcplog receiver #2701

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

nosammai
Copy link
@nosammai nosammai commented Feb 11, 2025

PR Description

This PR adds support for the otelcol tcp log receiver. I am not much of a golang programmer, so this PR was largely adapted from the one that added the syslog receiver.

Which issue(s) this PR fixes

Notes to the Reviewer

PR Checklist

  • CHANGELOG.md updated
  • Documentation added
  • Tests updated
  • Config converters updated

@nosammai nosammai requested review from clayton-cornell and a team as code owners February 11, 2025 20:10
@CLAassistant
Copy link
CLAassistant commented Feb 11, 2025

CLA assistant check
All committers have signed the CLA.

@ptodev ptodev self-assigned this Feb 12, 2025
Copy link
Collaborator
@ptodev ptodev left a comment

Choose a reason for hiding this comment

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

Thank you! It looks good. I only added a few minor comments.

CHANGELOG.md Outdated Show resolved Hide resolved
internal/component/otelcol/receiver/tcplog/tcplog.go Outdated Show resolved Hide resolved
internal/component/otelcol/receiver/tcplog/tcplog.go Outdated Show resolved Hide resolved
internal/component/otelcol/receiver/tcplog/tcplog.go Outdated Show resolved Hide resolved
test_config.alloy Outdated Show resolved Hide resolved
@nosammai
Copy link
Author

Thanks for the review! Updated the PR based on your feedback.

For the max log size stuff - I pulled all of that out of the syslog receiver, so it might be worth going and making the same changes there as well at some point.

@nosammai
Copy link
Author
nosammai commented Feb 12, 2025

Hmmm I can't get the test that's failing in CI to fail locally no matter how many times I run it.

I didn't copy this sleep over from the equivalent syslog test because that PR had been merged and it was passing locally. Do you think that would help?

https://github.com/nosammai/alloy/blob/otel-tcp-log-receiver/internal/component/otelcol/receiver/syslog/syslog_test.go#L61-L62

@dehaansa
Copy link
Contributor

Hmmm I can't get the test that's failing in CI to fail locally no matter how many times I run it.

I didn't copy this sleep over from the equivalent syslog test because that PR had been merged and it was passing locally. Do you think that would help?

https://github.com/nosammai/alloy/blob/otel-tcp-log-receiver/internal/component/otelcol/receiver/syslog/syslog_test.go#L61-L62

We attempted to remove the test after that PR was merged and it still failed in CI, so it might be relevant here as well. Haven't had the opportunity to go back and wait for the port to be ready in a better way than just the 1s wait.

Copy link
Contributor
@clayton-cornell clayton-cornell left a comment

Choose a reason for hiding this comment

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

Most doc suggestions are style related to bring this new topic in-line with the new/upcoming markdown styles and information flow.

A few minor content corrections were included.

@clayton-cornell clayton-cornell added the type/docs Docs Squad label across all Grafana Labs repos label Feb 13, 2025
Copy link
Collaborator
@ptodev ptodev left a comment

Choose a reason for hiding this comment

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

Apologies for the delay with the review! I added just one minor comment. It'll also need a rebase with main and it would be ready for merging!

@ptodev
Copy link
Collaborator
ptodev commented Feb 19, 2025

I'm sorry, the main branch got an updated OTel version and now this receiver will need to be updated too... If you want to I can rebase your branch and update it? I feel bad for asking you to rebase so many times 😅

nosammai and others added 7 commits February 19, 2025 10:35
Co-authored-by: Paulin Todev <paulin.todev@gmail.com>
Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
…log.md

Co-authored-by: Paulin Todev <paulin.todev@gmail.com>
@nosammai nosammai force-pushed the otel-tcp-log-receiver branch from bdbe244 to b340dd1 Compare February 19, 2025 15:41
@nosammai
Copy link
Author

No problem - rebased and updated to 0.119

@dehaansa
Copy link
Contributor

We should consider adding operators to the receiver (like filelogreceiver #2711 ) to ensure the full capacity of the stanza pipeline that underlies the otel log receivers.

This was not done when syslogreceiver was added due to some issues I had with the implementation, but resolved when adding filelog. I'm intending to add it to syslog before next release, so I can add it to tcplog later as well if you don't have capacity to add it in with this PR.

@nosammai
Copy link
Author

If you don't mind adding it in afterwards, I would appreciate that

@nosammai
Copy link
Author

The build failure looks like a transient 502 from yarn. I don't think I have permission to retrigger the builds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/docs Docs Squad label across all Grafana Labs repos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0