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

Roles support, Endpoint redirects and ping interval hints for Live Metrics #737

Merged
merged 8 commits into from
Mar 15, 2021

Conversation

rambhatt-msft
Copy link
Contributor

No description provided.

@rambhatt-msft rambhatt-msft marked this pull request as ready for review March 5, 2021 01:23
@@ -29,6 +29,8 @@ class QuickPulseStateManager {
private _metrics: {[name: string]: Contracts.MetricQuickPulse} = {};
private _documents: Contracts.DocumentQuickPulse[] = [];
private _collectors: {enable: (enable: boolean) => void}[] = [];
private _rediectedHost: string = null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious - why this vs updating the host in config? Is the idea that we don't want to expose the redirection when it happens?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not want to make this change persistent, if the agent is restarted, then it should start polling the endpoint it was originally configured to. It will be redirected again

@@ -130,7 +132,8 @@ class QuickPulseStateManager {
this._ping(envelope);
}

let currentTimeout = this._isCollectingData ? QuickPulseStateManager.POST_INTERVAL : QuickPulseStateManager.PING_INTERVAL;
let pingInterval = this._pollingIntervalHint > 0 ? this._pollingIntervalHint : QuickPulseStateManager.PING_INTERVAL;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible for endpoint to return negative polling internal hints?, how the SDK will come back to original ping interval?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the endpoint will not return negative values, and the SDK must not go back to the original ping interval unless it is restarted.

Copy link
Member

@hectorhdzg hectorhdzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for working on this

@hectorhdzg hectorhdzg merged commit fb23188 into microsoft:develop Mar 15, 2021
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

Successfully merging this pull request may close these issues.

None yet

4 participants