-
Notifications
You must be signed in to change notification settings - Fork 564
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
otelgrpc: bidi stream incremental span processor flush #436
Comments
@MrAlias I have same question, I guess the way it works is interceptor starts long running span for the whole stream and then implementations can add child spans/events to root span. Is it send to server on time without waiting for the root span to finish or root span has to end before whole batch can be sent? |
* Switch stdout exporter to use ungrouped batcher * Add unspecified keys to name without equals signs * Fix tests for stdout exporter * Add test for unspecified keys * Move test to stdout_test.go
My company has a central component that I'm trying to add tracing to. It involves a gRPC stream endpoint. The current implementation doesn't work for us. I don't (and I can't imagine anyone) want a never ending span on these streaming calls. It results in super large traces that are too large to get processed. And even if we could process, store, and visualize them, they aren't the unit of work I want a trace to be over. Can we modify the implementation to create spans per message? Or as the linked issue suggests provide a mechanism to specify when the spans should be created? In slack, @dmathieu asked for some research how other language/libraries handle this. The specification does seem to imply that the go library is partially correct in that it states one span per RPC and offers no distinction for stream connections. The spec does state that:
I don't believe the go library creates the events. It appears that Java has a similar implementation as go. An interesting quote
So while it appears that the go implementation conforms to the spec, it doesn't help me w/ my problem. For now, I've filtered out the streaming gRPC call and created a new root in the code that consumes the stream. This breaks up the trace, but leaves the remaining fragments usable. |
For gRPC instrumentation otelgrpc implementation adds 1 span per stream with span events tracking individual send/receive messages.
For long running bidirectional streams this has the potential of the span building up in memory and getting massive.
Are there any benchmarks and guidelines for such scenarios?
Is/would there some "incremental" span processor mechanism which could get invoked periodically and flush(and export?) the current state of spans even when the stream is not yet finished? (Fundamentally providing the inverse value proposition of the Batching processor)
The text was updated successfully, but these errors were encountered: