-
Notifications
You must be signed in to change notification settings - Fork 502
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
Switch to async exporters #232
Conversation
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.
Nice job! I think grpcio generally support async(I could be wrong since I didn't use the async part before). But didn't find thrift async crate. May need to figure out how to make that work.
@TommyCpp yeah may have to just use the thrift crate to write to a buffer synchronously and then send async |
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.
LGTM 👍
Ok going to see if making the jaeger exporter async is a quick change, if not can do in a follow up PR |
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.
Looks really nice 👍
@frigus02 good catch, still toying with the jaeger exporter but will fix those as well 🙏 |
Ok switched jaeger collector client to use the I also removed the max packet size option for the agent exporter as I don't think you can actually configure the packet size in any of the implementations. |
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'm not familiar with the Jaeger exporter, but as far as I understand these changes look nice.
Is it worth documenting, that users might want to enable the tokio or async-std feature when they're using the Jaeger agent?
This change updates the `SpanExporter interface to export asynchronously. The primary API change is:
Implementation notes:
Vec<_>
to&[_]
in exporters to avoid additional allocation when batch exporting.BatchSpanProcessorWorker
'sFuture
impl now awaits sub-futures so replaced with async block for greater clarity.and grpciocrates are not currently async, so some work still necessary to make jaeger and otlp exporters async (they currently call blocking code in a future, which is not great)