Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

Commit

Permalink
Appropriately Set gRPC Client Max Send and Receive Message Length (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
js8080 authored Aug 17, 2021
1 parent 4dfbd5b commit e00bc9d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Senders/Jaeger.Senders.Grpc/GrpcSender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,13 @@ public GrpcSender(string target, ChannelCredentials credentials, int maxPacketSi
maxPacketSize = MaxPacketSize;
}

_channel = new Channel(target, credentials);
var channelOptions = new List<ChannelOption>()
{
new ChannelOption(ChannelOptions.MaxSendMessageLength, maxPacketSize),
new ChannelOption(ChannelOptions.MaxReceiveMessageLength, maxPacketSize)
};

_channel = new Channel(target, credentials, channelOptions);
_client = new CollectorService.CollectorServiceClient(_channel);
_maxPacketSize = maxPacketSize;
}
Expand Down

0 comments on commit e00bc9d

Please sign in to comment.