* 🐛 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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user