Skip to content

Queue used to process server messages - #1

Draft
robsunday wants to merge 3 commits into
opamp-call-graphs-remote-configfrom
opamp-remote-config-async-processing
Draft

Queue used to process server messages#1
robsunday wants to merge 3 commits into
opamp-call-graphs-remote-configfrom
opamp-remote-config-async-processing

Conversation

@robsunday

Copy link
Copy Markdown
Owner

This is illustration of the idea of async processing of all server messages.
Queue is used to store and process ServerToAgent messages. ProfilingSupervisor no longer use queue.
It is not a complete, fully working solution yet (there is some startup issue with Snapshot Profiler that I need to investigate)


private static final Logger logger =
Logger.getLogger(ServerToAgentMessageHandler.class.getName());
private static final int MAX_MESSAGE_QUEUE_SIZE = 5;

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

[for reviewer] Just some max size to prevent memory errors in case processing hangs for some reason.

* request.
*/
private void tryStart() {
public synchronized void requestStartProfiling() {

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

[for reviewer] In the final solution requestStartProfiling() should be renamed to start(), requestStopProfiling() to stop() and requestReinitializeProfiling() to reinitialize(). I did not do it to avoid additional files to be modified, that would impact clarity of this draft

…ig-async-processing

# Conflicts:
#	opamp/src/main/java/com/splunk/opentelemetry/opamp/OpampActivator.java
#	opamp/src/main/java/com/splunk/opentelemetry/opamp/ServerToAgentMessageHandler.java
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.

1 participant