-
Notifications
You must be signed in to change notification settings - Fork 135
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
Conversation
Library/QuickPulseStateManager.ts
Outdated
@@ -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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this 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
No description provided.