Follow-up to https://github.com/census-ecosystem/opencensus-go-exporter-stackdriver/pull/295. If using an Insecure client with the OpenTelemetry collector, it will use the WithGRPCConn option. This grpc connection is then used for both the trace and stats clients. When closing the exporter, the second Close() call fails with error(s) closing trace client (<nil>), or metrics client (rpc error: code = Canceled desc = grpc: the client connection is closing), which indicates the connection is already closed. Handle this case by ignoring that error.
Follow-up to https://github.com/census-ecosystem/opencensus-go-exporter-stackdriver/pull/295. If using an Insecure client with the OpenTelemetry collector, it will use the
WithGRPCConn
option. This grpc connection is then used for both the trace and stats clients. When closing the exporter, the secondClose()
call fails witherror(s) closing trace client (<nil>), or metrics client (rpc error: code = Canceled desc = grpc: the client connection is closing)
, which indicates the connection is already closed. Handle this case by ignoring that error.This is required to fix unit test errors in https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/5990.
The go.sum changes must be left-over from a previous PR that didn't tidy?