-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add plain HTTP transport to OpAMP #70
Merged
tigrannajaryan
merged 2 commits into
open-telemetry:main
from
tigrannajaryan:add-plain-http
Apr 7, 2022
Merged
Add plain HTTP transport to OpAMP #70
tigrannajaryan
merged 2 commits into
open-telemetry:main
from
tigrannajaryan:add-plain-http
Apr 7, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Resolves open-telemetry#50 Certain applications may not need the OpAMP's capabilities enabled by WebSocket (ability to push configs from server without Agent's polling) and may prefer to implement a simpler HTTP transport. This is likely the case for short-lived Agents such as for example the ones running in AWS lambda. The HTTP transport is likely simpler to implement on the Server (easier to manage connections) and also removes an additional dependency (a WebSocket library) from the client. We are also considering implementing OpAMP in OpenTelemetry SDKs, which can result in significantly larger number of OpAMP Agents connecting to the Server, so the Server has to handle a larger number of persistent WebSocket connections, which may pose more burden than necessary for use cases where there are no benefits from having a persistent connection (e.g. the above mentioned short-lived use case). This changes defines a plain HTTP transport for OpAMP. It is a fairly simple modification of the spec to allow it, with AgentToServer/ServerToAgent messages exchanged via HTTP POST Body. It is also not very complicated to support both WebSocket and plain HTTP on the same Server and if we want to make it seamless from Agent's perspective we can add an indicator of the desired transport in the initial connection attempt made by the Agent, so that the Server knows whether to upgrade to WebSocket or just reply in plain HTTP. The "Content-Type" request header can be such indicator. We can add this in a follow-up PR. Here is a draft Go OpAMP server implementation for reference: open-telemetry/opamp-go@main...tigrannajaryan:plain-http-transport
In the above PR, it is not clear from the second paragraph that here we are considering OpenTelemetry SDKs as agents, may be very should make it more explicit. |
@pmm-sumo what do you think about this change? |
pmm-sumo
reviewed
Apr 1, 2022
pmm-sumo
reviewed
Apr 1, 2022
pmm-sumo
reviewed
Apr 1, 2022
pmm-sumo
reviewed
Apr 1, 2022
I think it will be a very useful addition. I think it might be worth running by OpenTelemetry SDK's maintainers, since this is one of the use cases for it |
This was referenced Apr 4, 2022
tigrannajaryan
commented
Apr 4, 2022
pmm-sumo
approved these changes
Apr 7, 2022
tigrannajaryan
added a commit
to tigrannajaryan/opamp-go
that referenced
this pull request
Apr 7, 2022
This adds plain HTTP request support to OpAMPServer implementation. Implements spec change: open-telemetry/opamp-spec#70
tigrannajaryan
added a commit
to tigrannajaryan/opamp-go
that referenced
this pull request
Apr 7, 2022
This adds plain HTTP request support to OpAMPServer implementation. Implements spec change: open-telemetry/opamp-spec#70
tigrannajaryan
added a commit
to tigrannajaryan/opamp-go
that referenced
this pull request
Apr 7, 2022
This adds plain HTTP request support to OpAMPServer implementation. Implements spec change: open-telemetry/opamp-spec#70
tigrannajaryan
added a commit
to tigrannajaryan/opamp-go
that referenced
this pull request
Apr 7, 2022
This adds plain HTTP request support to OpAMPServer implementation. Implements spec change: open-telemetry/opamp-spec#70
tigrannajaryan
added a commit
to tigrannajaryan/opamp-go
that referenced
this pull request
Apr 12, 2022
This adds plain HTTP request support to OpAMPServer implementation. Implements spec change: open-telemetry/opamp-spec#70
tigrannajaryan
added a commit
to tigrannajaryan/opamp-go
that referenced
this pull request
Apr 12, 2022
This adds plain HTTP request support to OpAMPServer implementation. Implements spec change: open-telemetry/opamp-spec#70
tigrannajaryan
added a commit
to tigrannajaryan/opamp-go
that referenced
this pull request
Apr 12, 2022
This adds plain HTTP request support to OpAMPServer implementation. Implements spec change: open-telemetry/opamp-spec#70
tigrannajaryan
added a commit
to tigrannajaryan/opamp-go
that referenced
this pull request
Apr 12, 2022
This adds plain HTTP request support to OpAMPServer implementation. Implements spec change: open-telemetry/opamp-spec#70
tigrannajaryan
added a commit
to open-telemetry/opamp-go
that referenced
this pull request
Apr 13, 2022
This adds plain HTTP request support to OpAMPServer implementation. Implements spec change: open-telemetry/opamp-spec#70
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #50
Certain applications may not need the OpAMP's capabilities enabled by WebSocket (ability to push configs from server without Agent's polling) and may prefer to implement a simpler HTTP transport. This is likely the case for short-lived Agents such as for example the ones running in AWS lambda. The HTTP transport is likely simpler to implement on the Server (easier to manage connections) and also removes an additional dependency (a WebSocket library) from the client.
We are also considering implementing OpAMP in OpenTelemetry SDKs, which can result in significantly larger number of OpAMP Agents connecting to the Server, so the Server has to handle a larger number of persistent WebSocket connections, which may pose more burden than necessary for use cases where there are no benefits from having a persistent connection (e.g. the above mentioned short-lived use case).
This changes defines a plain HTTP transport for OpAMP. It is a fairly simple modification of the spec to allow it, with AgentToServer/ServerToAgent messages exchanged via HTTP POST Body.
It is also not very complicated to support both WebSocket and plain HTTP on the same Server and if we want to make it seamless from Agent's perspective we can add an indicator of the desired transport in the initial connection attempt made by the Agent, so that the Server knows whether to upgrade to WebSocket or just reply in plain HTTP. The "Content-Type" request header can be such indicator. We can add this in a follow-up PR.
Here is a draft Go OpAMP server implementation for reference: open-telemetry/opamp-go@main...tigrannajaryan:plain-http-transport