xuanyu66 opened a new issue #6222:
URL: https://github.com/apache/skywalking/issues/6222
Please answer these questions before submitting your issue.
- Why do you submit this issue?
- [X ] Question or discussion
- [ ] Bug
- [ ] Requirement
- [ ] Feature or performance improvement
___
### Question
- What do you want to know?
I want to add dns resolver for the domain of skywalking trace receiver
service
- WHY ?
- It's hard to maintain agent config
`collector.backend_service=${SW_AGENT_COLLECTOR_BACKEND_SERVICES:127.0.0.1:11800}
`
- If extending OAP service, we must restart all service.
- HOW ?
- In this situation, I want to set domain to this variable.The domain has
a number of A records
- modify the method boot() of GRPCChannelManager, check whether it is
domain, if so ,then resolve it ,and add all ip addresses to serverList
```
public void boot() {
if (Config.Collector.BACKEND_SERVICE.trim().length() == 0) {
LOGGER.error("Collector server addresses are not set.");
LOGGER.error("Agent will not uplink any data.");
return;
}
grpcServers =
Arrays.asList(Config.Collector.BACKEND_SERVICE.split(","));
// resolve all domain to ip and add to server List
connectCheckFuture = Executors.newSingleThreadScheduledExecutor(
new DefaultNamedThreadFactory("GRPCChannelManager")
).scheduleAtFixedRate(
new RunnableWithExceptionProtection(
this,
t -> LOGGER.error("unexpected exception.", t)
), 0, Config.Collector.GRPC_CHANNEL_CHECK_INTERVAL,
TimeUnit.SECONDS
);
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]