-
Notifications
You must be signed in to change notification settings - Fork 35
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
Consider adding a "status compressed/full" flag to AgentToServer #109
Comments
This is a draft PR to demonstrate how open-telemetry/opamp-spec#109 can be resolved. The new StatusIsFullSet is set by the agent the status is fully set the message. The server checks the flag to know if it needs to request the full status. This is a backward compatible change. New servers that work with old agents may make an extra request for the full status because old agents don't set this flag, but this was already a problem in the past even before this change.
Here is a draft implementation with the new flag: open-telemetry/opamp-go#103 |
I am on vacation right now, but I thought that the AgentToServer message would be one of the following: For each submessage, either
A message would be considered compressed if any submessage supported by the agent is nil. The message is full if no submessages supported by the agent are nil. If an agent contacts the server and sends a compressed message (as determined above), the server adds the ServerToAgent_ReportFullState flag to receive the full status of the agent. |
That's a good point. The problem is that we don't have all necessary capability flags to indicate this. There is none for AgentHealth and for RemoteConfigStatus. Perhaps that's what we are missing. If all compressible submessages have a corresponding capabilities flag then the fact of compression is possible to establish without this new flag I suggested. Let me think a bit. |
BindPlane OP does not currently support AgentHealth (coming soon!), but for RemoteConfigStatus I check For AgentHeath we could add |
This is an alternate draft PR to demonstrate how open-telemetry/opamp-spec#109 can be resolved without adding a new "compressed/full" flag, suggested by @andykellr
@andykellr he is another draft PR that implements the approach you suggested: open-telemetry/opamp-go#105 It is a smaller change, but I am reluctant with this approach since it requires more checks to detect compression, which is a potential source of bug. Thoughts? |
I don't feel that strongly about it, but in general my instinct is to avoid a second piece of information that can already be derived from the information that exists. Typically this leads to ambiguity when the flag says it is complete (but it isn't) or the flag says it is not complete (but it is). In this particular case, as long as we consider the flag authoritative, I don't see an issue. This means that if the flag says it is complete, ReportFullState should not report additional information and if the flag says it is incomplete, ReportFullState should report additional information. It does simplify reasoning about the message. |
@andykellr I thought a bit more and I agree with you. Closing this in favour of #111 and open-telemetry/opamp-go#105 |
We check the omitted and the corresponding capability bit to understand if the compression was used. Related to spec issue open-telemetry/opamp-spec#109 The issue was discarded in favour of the implementation that does not change the spec, but instead uses already existing information.
We check the omitted field and the corresponding capability bit to understand if the compression was used. Related to spec issue open-telemetry/opamp-spec#109 The issue was discarded in favour of the implementation that does not change the spec, but instead uses already existing information.
We check the omitted field and the corresponding capability bit to understand if the compression was used. Related to spec issue open-telemetry/opamp-spec#109 The issue was discarded in favour of the implementation that does not change the spec, but instead uses already existing information.
We check the omitted field and the corresponding capability bit to understand if the compression was used. Related to spec issue open-telemetry/opamp-spec#109 The issue was discarded in favour of the implementation that does not change the spec, but instead uses already existing information.
The Server currently cannot tell if the status was compressed. As a consequence when it receives a message from an Agent it didn't see before it needs to ask for the full status. This unnecessary extra exchange when the Agent reports to the Server for the first time.
This can be avoided if we add a bit flag to indicate the that the status was compressed. If it is not (as is the case for newly starting Agents) the Server won't ask for full status.
The text was updated successfully, but these errors were encountered: