-
Notifications
You must be signed in to change notification settings - Fork 967
Introduce ConfigSourceLifecycleObserver
#6488
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
base: main
Are you sure you want to change the base?
Conversation
ikhoon
left a comment
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.
👍👍
minwoox
left a comment
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.
👍 👍 👍
| "Only envoyGrpc is supported for '%s'", configSource); | ||
| final EnvoyGrpc envoyGrpc = firstGrpcService.getEnvoyGrpc(); | ||
|
|
||
| final boolean ads = configSource.hasAds(); |
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.
nit: we can move this to line 85.
|
|
||
| private MeterRegistry meterRegistry = Flags.meterRegistry(); | ||
| private MeterIdPrefix meterIdPrefix = DEFAULT_METER_ID_PREFIX; | ||
| private EventExecutor eventExecutor = DEFAULT_GROUP.next(); |
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.
nit: what do you think ok creating DEFAULT_GROUP only when eventExecutor is not specified in the build method?
Motivation:
This PR introduces
ConfigSourceLifecycleObserverwhich observes aConfigSourceClient.This may be useful when users would like to monitor the client which fetches xDS resources and can be as an equivalent of subscription statistics in envoy
ref: https://www.envoyproxy.io/docs/envoy/latest/configuration/overview/mgmt_server#xds-subscription-statistics
In order to allow users to select the
MeterRegistry/MeterIdPrefixaXdsBootstrapBuilderis introduced. While it is trivial to allow users to customize theConfigSourceLifecycleObserver, I don't think it's necessary at this stage and could be easily done later on if there is need for it.Modifications:
ConfigSourceLifecycleObserverand a default implementationDefaultConfigSourceLifecycleObserverConfigSourceLifecycleObservercallback methods are called fromSotwXdsStreamXdsBootstrapBuilderwhich allows users to customize theMeterRegistry,MeterIdPrefixEventExecutorused is dedicated for pushing xDS updates.Result:
ConfigSourceClientvia metrics