-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[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
Conversation
072000a
to
c89127f
Compare
// 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() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using errgroup.Group
here?
There was a problem hiding this comment.
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
There was a problem hiding this 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
There was a problem hiding this 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.
Co-authored-by: Curtis Robert <[email protected]>
…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]>
…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]>
…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]>
Description
Adds just enough code to make the stefreceiver work.
Link to tracking issue
Fixes #38979
Testing
Roundtrip with the exporter
Documentation
README