Skip to content
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

Client should expose the internal sender or provide a method to send async message to the server #45

Closed
kart opened this issue Dec 20, 2021 · 2 comments

Comments

@kart
Copy link

kart commented Dec 20, 2021

Currently, neither the transport sender (internal.Sender) or a method that allows for async send to the server is exposed by the client.

As the supervisor is shaping up, I think the client should expose a way to send async messages to the sender. I can think of a few reasons:

  1. Report failing health of the agent or worse, termination status of the agent.
  2. Report agent restart metrics.
  3. Report agent package or addon download progress. This is allowed in the spec, but the client doesn't have enough context to fetch this information and for good reasons, I don' think it should either. Instead, the actual downloader should have the ability to report progress to the server through the client.
@tigrannajaryan
Copy link
Member

Generally, I do not think we should expose Sender directly. If we need to send a message then it should be exposed in the OpAMPClient interface, similar to for example SetEffectiveConfig. Let's keep Sender in internal.

Report failing health of the agent or worse, termination status of the agent.
Report agent restart metrics.

I think these are both expected to be reported via own telemetry, so shouldn't be done via OpAMP. What OpAMP message do you want to send for these 2 cases?

Report agent package or addon download progress.

This should happen in response to the OnAddonsAvailable/OnAgentPackageAvailable callbacks. The AddonSyncer and AgentPackageSyncer are supposed to have the context to report the progress. Are these not sufficient?

@kart
Copy link
Author

kart commented Jan 6, 2022

I think you are right. I was thinking that there might be separate telemetry needs from the supervisor -- reporting the up/down stats of the collector, but the spec as it stands today doesn't talk about this at least not in the context of the supervisor. And as to the agent/addon download status, etc, the syncer should be a good place.

@kart kart closed this as completed Jan 6, 2022
tigrannajaryan added a commit to tigrannajaryan/opamp-go that referenced this issue Mar 9, 2022
…y#45) (open-telemetry#28)

This field already exists in AgentAddonStatuses and is not needed
in StatusReport.
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

No branches or pull requests

2 participants