-
Notifications
You must be signed in to change notification settings - Fork 3.9k
xds: Add counter and gauge metrics #11661
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
Changes from 1 commit
d085aca
ef7bfcd
f60c985
4f01651
5881cb6
4831431
cbe2659
3a283e4
fb71c60
80a9c40
e04164b
7dd4402
fc60ef9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
…it tests
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,6 @@ | |
import io.grpc.ExperimentalApi; | ||
import io.grpc.Status; | ||
import io.grpc.xds.client.Bootstrapper.ServerInfo; | ||
import io.grpc.xds.client.XdsClientMetricReporter.CallbackMetricReporter; | ||
import java.net.URI; | ||
import java.net.URISyntaxException; | ||
import java.util.ArrayList; | ||
|
@@ -380,8 +379,20 @@ | |
throw new UnsupportedOperationException(); | ||
} | ||
|
||
/** Callback used to report gauge metric value for resources. */ | ||
public interface ResourceCallback { | ||
ejona86 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// TODO(@dnvindhya): include the "authority" label once xds.authority is available. | ||
void reportResourceCountGauge(long resourceCount, String cacheState, String resourceType, | ||
String target); | ||
} | ||
|
||
/** Callback used to report a gauge metric value for server connections. */ | ||
public interface ServerConnectionCallback { | ||
void reportServerConnectionGauge(int isConnected, String target, String xdsServer); | ||
} | ||
|
||
/** | ||
* Reports the number of resources in each cache state through {@link CallbackMetricReporter}. | ||
* Reports the number of resources in each cache state. | ||
* | ||
* <p>Cache state is determined by two factors: | ||
* <ul> | ||
|
@@ -390,17 +401,15 @@ | |
* resource. | ||
* </ul> | ||
*/ | ||
public SettableFuture<Void> reportResourceCounts(CallbackMetricReporter callbackMetricReporter) { | ||
public SettableFuture<Void> reportResourceCounts(ResourceCallback callback) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
/** | ||
* Reports whether xDS client has a working ADS stream to xDS server. Reporting is done through | ||
* {@link CallbackMetricReporter}. | ||
* Reports whether xDS client has a working ADS stream to xDS server. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I used There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It isn't the dictionary definition of "working", but you're right that it is the proposal's definition. I'd be happier if you put quotes around working, but it's up to you. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added quotes around working. |
||
*/ | ||
public SettableFuture<Void> reportServerConnections( | ||
CallbackMetricReporter callbackMetricReporter) { | ||
public SettableFuture<Void> reportServerConnections(ServerConnectionCallback callback) { | ||
ejona86 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
static final class ProcessingTracker { | ||
|
Uh oh!
There was an error while loading. Please reload this page.