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

Use stream and completed for a bulk to collect for grpc reporter. #54

Merged
merged 3 commits into from
Feb 15, 2023

Conversation

jmjoy
Copy link
Member

@jmjoy jmjoy commented Feb 12, 2023

In the past, for convenience, collect was called every time the data was received.

Now it is changed to stream mode, and only call collect once, which should improve the performance.

@jmjoy jmjoy added this to the 0.6.0 milestone Feb 12, 2023
@codecov-commenter
Copy link

codecov-commenter commented Feb 12, 2023

Codecov Report

Merging #54 (3e5a18c) into master (7d4b379) will decrease coverage by 0.34%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master      #54      +/-   ##
==========================================
- Coverage   17.51%   17.18%   -0.34%     
==========================================
  Files          17       17              
  Lines         571      582      +11     
==========================================
  Hits          100      100              
- Misses        471      482      +11     
Impacted Files Coverage Δ
src/reporter/grpc.rs 0.00% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@wu-sheng
Copy link
Member

Is this a gRPC stream? If so, gRPC stream should be completed for a bulk. Keeping a stream always open may have side effect, and cause too much load to maintain the uncompleted status.

@jmjoy
Copy link
Member Author

jmjoy commented Feb 13, 2023

Is this a gRPC stream? If so, gRPC stream should be completed for a bulk. Keeping a stream always open may have side effect, and cause too much load to maintain the uncompleted status.

OK, will adjust.

@wu-sheng
Copy link
Member

Ref this.

https://github.com/apache/skywalking/blob/master/oap-server/server-receiver-plugin/skywalking-trace-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/trace/provider/handler/v8/grpc/TraceSegmentReportServiceHandler.java#L63

If you are going to implement push Command for downstream/agent. OnComplete is a trigger point. Not through trace segment report, but other gRPC service. And backend self-telemetry relies on this to summary statistics.

@jmjoy
Copy link
Member Author

jmjoy commented Feb 13, 2023

I want to adjust it as follows:

Every 30 seconds, the stream will end, and then collect will be called again. How about that?

@wu-sheng
Copy link
Member

I want to adjust it as follows:

Every 30 seconds, the stream will end, and then collect will be called again. How about that?

You could control it according to rust implementation. Just keep it neither always open, nor keep open/close for every segment.

@jmjoy jmjoy changed the title Use stream to collect for grpc reporter. Use stream and completed for a bulk to collect for grpc reporter. Feb 15, 2023
@jmjoy jmjoy marked this pull request as ready for review February 15, 2023 02:32
@jmjoy jmjoy requested a review from wu-sheng February 15, 2023 02:32
Copy link
Member

@wu-sheng wu-sheng left a comment

Choose a reason for hiding this comment

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

LGTM

@wu-sheng wu-sheng merged commit c39722c into apache:master Feb 15, 2023
@jmjoy jmjoy deleted the report branch February 15, 2023 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants