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

low-cost app api endpoint to determine probe connectedness #2982

Closed
rade opened this issue Dec 13, 2017 · 2 comments
Closed

low-cost app api endpoint to determine probe connectedness #2982

rade opened this issue Dec 13, 2017 · 2 comments
Assignees
Labels
chore Related to fix/refinement/improvement of end user or new/existing developer functionality

Comments

@rade
Copy link
Member

rade commented Dec 13, 2017

In Weave Cloud we'd benefit from having an API endpoint that tells is whether there are any probes connected. ATM the UI is invoking /api/probes for that, which entails fetching and merging the reports for the current app window and hence is expensive.

@rade rade added the chore Related to fix/refinement/improvement of end user or new/existing developer functionality label Dec 13, 2017
@rade
Copy link
Member Author

rade commented Dec 13, 2017

I wonder whether expanding the /api endpoint might be the way to go. That endpoint returns a bunch of readily available info. The exception is plugins, which requires report fetching; we could have a /api?sparse variant that excludes that.

@rade
Copy link
Member Author

rade commented Dec 13, 2017

In order to determine "whether there are any probes connected", we could expand the app.Reporter interface with a HasReports(context.Context, time.Time) (bool, error) method - if we have reports we must have probes.

In case of of the awsCollector, the implementation of that method would simply execute the first portion of Report(), which queries Dynamo for the report keys, which is a fast operation.

@rade rade self-assigned this Dec 13, 2017
rade added a commit that referenced this issue Dec 14, 2017
cheap probe connectedness api endpoint

Fixes #2982.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Related to fix/refinement/improvement of end user or new/existing developer functionality
Projects
None yet
Development

No branches or pull requests

1 participant