Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Release Notes.
* Supports modifying span attributes in async mode.
* Agent supports the collection of JVM arguments and jar dependency information.
* [Temporary] Support authentication for log report channel. This feature and grpc channel is going to be removed after Satellite 0.2.0 release.
* Remove deprecated gRPC method, `io.grpc.ManagedChannelBuilder#nameResolverFactory`. See [gRPC-java 7133](https://github.com/grpc/grpc-java/issues/7133) for more details.

#### OAP-Backend
* Disable Spring sleuth meter analyzer by default.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
import io.grpc.ConnectivityState;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import io.grpc.NameResolverRegistry;
import io.grpc.internal.DnsNameResolverProvider;
import io.grpc.netty.NettyChannelBuilder;
import java.util.LinkedList;
import java.util.List;
Expand All @@ -34,9 +36,11 @@ public class GRPCChannel {
private final Channel channelWithDecorators;

private GRPCChannel(String host, int port, List<ChannelBuilder> channelBuilders,
List<ChannelDecorator> decorators) throws Exception {
List<ChannelDecorator> decorators) throws Exception {
ManagedChannelBuilder channelBuilder = NettyChannelBuilder.forAddress(host, port);

NameResolverRegistry.getDefaultRegistry().register(new DnsNameResolverProvider());

for (ChannelBuilder builder : channelBuilders) {
channelBuilder = builder.build(channelBuilder);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@
package org.apache.skywalking.apm.agent.core.remote;

import io.grpc.ManagedChannelBuilder;
import io.grpc.internal.DnsNameResolverProvider;

public class StandardChannelBuilder implements ChannelBuilder {
private final static int MAX_INBOUND_MESSAGE_SIZE = 1024 * 1024 * 50;

@Override
public ManagedChannelBuilder build(ManagedChannelBuilder managedChannelBuilder) {
return managedChannelBuilder.nameResolverFactory(new DnsNameResolverProvider())
.maxInboundMessageSize(MAX_INBOUND_MESSAGE_SIZE)
return managedChannelBuilder.maxInboundMessageSize(MAX_INBOUND_MESSAGE_SIZE)
.usePlaintext();
}
}