From the spec, the current recommendation is
https://github.com/open-telemetry/opamp-spec/blob/main/specification.md#plain-http-transport-1
Plain HTTP Transport
The Client is considered logically disconnected as soon as the OpAMP HTTP response is completed. It is not necessary for the Client to send AgentToServer message with agent_disconnect field set since it is always implied anyway that the Client connection is gone after the HTTP response is completed.
HTTP keep-alive may be used by the Client and the Server but it has no effect on the logical operation of the OpAMP protocol.
The Server may use its own business logic to decide what it considers an active Agent (e.g. an Client that continuously polls) vs an inactive Agent (e.g. a Client that has not made an HTTP request for a specific period of time). This business logic is outside the scope of OpAMP specification.
However, if a plain HTTP opamp connection restarts, we've seen customers(in VM based environments) complain about seeing 2 connections until the server cleanup mechanism kicks in.
A solution to this could be to just have the recommendation for Plain HTTP OpAMP clients to send the agent_disconnect flag wherever possible. If not possible, then the server can still have a cleanup mechanism in place for things like kill -9 and similar sorts.
From the spec, the current recommendation is
https://github.com/open-telemetry/opamp-spec/blob/main/specification.md#plain-http-transport-1
However, if a plain HTTP opamp connection restarts, we've seen customers(in VM based environments) complain about seeing 2 connections until the server cleanup mechanism kicks in.
A solution to this could be to just have the recommendation for Plain HTTP OpAMP clients to send the
agent_disconnectflag wherever possible. If not possible, then the server can still have a cleanup mechanism in place for things likekill -9and similar sorts.