🐛 debug grpc export (#2379) (#2719)

* 🐛 debug grpc export (#2379) 

#2379 Fixed the issue that the GRPC exporter did not establish an RPC link
原文使用的 otlptracegrpc.NewUnstarted创建的是一个未建立rpc连接的导出器,无法正常使用;改为otlptracegrpc.New才妥

* Update agent_test.go

修复单元测试失败
This commit is contained in:
wojiukankan
2023-01-03 17:04:35 +08:00
committed by GitHub
parent 1c544a26be
commit 85057a623d
2 changed files with 6 additions and 6 deletions

View File

@@ -60,11 +60,12 @@ func createExporter(c Config) (sdktrace.SpanExporter, error) {
case kindZipkin:
return zipkin.New(c.Endpoint)
case kindGrpc:
return otlptracegrpc.NewUnstarted(
return otlptracegrpc.New(
context.Background(),
otlptracegrpc.WithInsecure(),
otlptracegrpc.WithEndpoint(c.Endpoint),
otlptracegrpc.WithDialOption(grpc.WithBlock()),
), nil
)
default:
return nil, fmt.Errorf("unknown exporter: %s", c.Batcher)
}