-
Notifications
You must be signed in to change notification settings - Fork 773
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
Grpc exporter doesn't follow dns change. #4813
Comments
@pengweiqhca I am not able to repro this behavior you are noticing (I do not see any interruption). looking at the doc as well, it should continue to work. @JamesNK Could you please confirm? Reference: Grpc Channel Config for otlp exporter. |
I'm not an expert at reacting to DNS changes. Changing the code to use Grpc.Net.Client.ClientFactory is one option. A simpler change would be to specify a |
@JamesNK Thanks! The behavior I am noticing is there is no interruption in connection during ip changes with this Grpc Channel Config (different than what reported on this issue). If I interpret this doc correctly, we dont have to do anything and it should automatically refresh. is that correct? |
Once a connection is up and running, SocketsHttpHandler controls the connection lifetime. I think https://learn.microsoft.com/en-us/dotnet/api/system.net.http.socketshttphandler.pooledconnectionlifetime?view=net-7.0#system-net-http-socketshttphandler-pooledconnectionlifetime is what you want to set.
I don't know. As I said, I'm not an expert in this area. |
This issue was marked stale due to lack of activity and will be closed in 7 days. Commenting will instruct the bot to automatically remove the label. This bot runs once per day. |
Bug Report
List of all OpenTelemetry NuGet
packages and version that you are
using (e.g.
OpenTelemetry 1.0.2
):Runtime version (e.g.
net462
,net48
,netcoreapp3.1
,net6.0
etc. You canfind this information from the
*.csproj
file):Symptom
When i changed dns ip, grpc exporter still connected the old ip.
What is the expected behavior?
Grpc connect to new ip.
What is the actual behavior?
Grpc still connected the old ip long after i change dns.
Reproduce
ip.addr == ip1 && tcp.port = 4317
.ip.addr == ip2 && tcp.port = 4317
.Additional Context
Grpc.Net use
SocketsHttpHandler
in .net6.0 and SocketsHttpHandler.PooledConnectionLifetime is InfiniteTimeSpan.GrpcChannel.ForAddress(options.Endpoint) have no any options, so
SocketsHttpHandler
will use default settings. If grpc exporter is used every 1 minute, the http connection will never be disposed and always use the old connection, so there need to use theGrpcClientFactory
instead.The text was updated successfully, but these errors were encountered: