Skip to content

[receiver/stef] Add enough code to make the stefreceiver function #39044

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 6 commits into from
Apr 4, 2025

Conversation

atoulme
Copy link
Contributor

@atoulme atoulme commented Mar 30, 2025

Description

Adds just enough code to make the stefreceiver work.

Link to tracking issue

Fixes #38979

Testing

Roundtrip with the exporter

Documentation

README

@github-actions github-actions bot requested a review from pjanotti March 30, 2025 05:48
@atoulme atoulme force-pushed the stefreceiver branch 3 times, most recently from 072000a to c89127f Compare March 30, 2025 20:35
// Create a responder for this stream and run it in a separate goroutine.
resp := internal.NewResponder(r.settings.Logger, stream)
defer resp.Stop()
go resp.Run()
Copy link
Contributor

Choose a reason for hiding this comment

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

Using errgroup.Group here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that didn't really work out, but maybe a different way to build this interaction would make sense

Copy link
Contributor

@pjanotti pjanotti left a comment

Choose a reason for hiding this comment

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

Minor suggestions and a couple of Qs.

- `endpoint` (default = localhost:4320 for grpc protocol):
host:port to which the receiver is going to receive data. The valid syntax is
described at https://github.com/grpc/grpc/blob/master/doc/naming.md.
- `ack_interval` (default: 10ms). The periodical interval of time when sending acknowledgements back to the client.
Copy link
Contributor

Choose a reason for hiding this comment

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

side Q.: how was this default value chosen? Without any context, at first, it seems too frequent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's not that frequent ; it's 10ms as a gRPC response on an established TCP stream. You could say, if it's just a single message exchange, that it's a bit high. I think it will need to be revisited to be more adaptive moving forward.

The 10ms is just to avoid spamming with responses every time data is consumed. By waiting 10ms, the code sends responses less often, which is best when dealing with a constant stream of data.

Copy link
Member

@tigrannajaryan tigrannajaryan left a comment

Choose a reason for hiding this comment

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

It would be great to also add STEF receiver/exporter to the testbed. I am curious what the end-to-end perf looks like.

Copy link
Member

@crobert-1 crobert-1 left a comment

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 more testing that would more heavily exercise the synchronization and goroutines being used here, but it can be done in a follow up.

@atoulme atoulme merged commit fcbcbd4 into open-telemetry:main Apr 4, 2025
169 of 170 checks passed
@github-actions github-actions bot added this to the next release milestone Apr 4, 2025
dmathieu pushed a commit to dmathieu/opentelemetry-collector-contrib that referenced this pull request Apr 8, 2025
…en-telemetry#39044)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Adds just enough code to make the stefreceiver work.

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes open-telemetry#38979 

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Roundtrip with the exporter

<!--Describe the documentation added.-->
#### Documentation
README

<!--Please delete paragraphs that you did not use before submitting.-->

---------

Co-authored-by: Curtis Robert <[email protected]>
LucianoGiannotti pushed a commit to LucianoGiannotti/opentelemetry-collector-contrib that referenced this pull request Apr 9, 2025
…en-telemetry#39044)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Adds just enough code to make the stefreceiver work.

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes open-telemetry#38979 

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Roundtrip with the exporter

<!--Describe the documentation added.-->
#### Documentation
README

<!--Please delete paragraphs that you did not use before submitting.-->

---------

Co-authored-by: Curtis Robert <[email protected]>
Fiery-Fenix pushed a commit to Fiery-Fenix/opentelemetry-collector-contrib that referenced this pull request Apr 24, 2025
…en-telemetry#39044)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Adds just enough code to make the stefreceiver work.

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes open-telemetry#38979 

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Roundtrip with the exporter

<!--Describe the documentation added.-->
#### Documentation
README

<!--Please delete paragraphs that you did not use before submitting.-->

---------

Co-authored-by: Curtis Robert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New component: STEF receiver
6 participants