-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[extension/opamp] Add support for custom messages #32021
Labels
Comments
BinaryFissionGames
added
enhancement
New feature or request
needs triage
New item requiring triage
labels
Mar 28, 2024
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
For context, I added the CustomMessage feature to opamp-spec and opamp-go and reviewed this proposal with Brandon. Looking forward to feedback. |
I update the proposal to add:
|
evan-bradley
added
priority:p2
Medium
and removed
needs triage
New item requiring triage
labels
Apr 2, 2024
evan-bradley
pushed a commit
that referenced
this issue
May 3, 2024
**Description:** <Describe what has changed.> * Adds support for utilizing custom capabilities with the opamp extension **Link to tracking Issue:** #32021 **Testing:** * Unit tests **Documentation:** Added some docs for usage to the opamp extension README
Closing as completed with #32951 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Component(s)
extension/opamp
Is your feature request related to a problem? Please describe.
Some components may provide extra capabilities that can be leveraged by an OpAMP server. In the OpAMP specification, these are codified as custom messages, but there is currently no way for a collector component to take advantage of these custom messages.
Since support for custom messages has been released in the opamp-go library, we should be able to start using them in the opamp extension.
Describe the solution you'd like
The opampextension is the sole communication point between the OpAMP server and the collector. Because of this, it follows that other components that wish to communicate with the OpAMP server will need to do so through the opampextension.
Similar to the storage extension interface, we propose the following interface for interacting with the opampextension:
Here, opampextension would satisfy the
CustomCapabilityRegistry
interface, allowing for other components to register the custom capability it supports. The opampextension will then keep track of what capabilities have been registered, and a list of callbacks for each capability, since multiple components may register as supporting the same capability.The list of supported custom capabilities that the opampextension has will be the union of all unique capability strings registered.
When a custom message for the registered capability is sent from the server to the agent, it is broadcast to all callbacks for the capability. These callbacks are called asynchronously (in their own separate goroutines).
When registering, an object satisfying the
CustomCapability
interface is returned that can be used to send messages for the custom capability, as well as to unregister the custom capability.This design allows the registry to keep track internally of which calls to register correspond to which calls of unregister, so that a single instance of a component cannot unregister a capability for a different component. It also restricts sending a message until after the capability has been registered.
Calling
SendMessage
afterUnregister
will return an error and the message will not be sent.The supervisor will simply proxy custom messages between the agent and the OpAMP server, as it does for other messages.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: