Apache camel 如何使用Apache Camel保留聚合的父级范围?

Apache camel 如何使用Apache Camel保留聚合的父级范围?,apache-camel,jaeger,opentracing,Apache Camel,Jaeger,Opentracing,我有一个带有的Apache Camel应用程序,它使用来持久化交换。我还使用with Jaeger跟踪我的应用程序。但是在聚合之后,下一个跨度的父跨度是错误的 Jaeger用户界面 具有direct输出的路由范围应为具有direct聚合的路由范围之一的子级 春季启动应用程序 @springboot应用程序 @骆驼眼追踪 公共类测试应用程序{ @豆子 公共端点routeBuilder routeBuilder(聚合存储库testAggregationRepository,聚合策略testAggr

我有一个带有的Apache Camel应用程序,它使用来持久化交换。我还使用with Jaeger跟踪我的应用程序。但是在聚合之后,下一个跨度的父跨度是错误的

Jaeger用户界面

具有direct
输出的路由范围应为具有direct
聚合的路由范围之一的子级

春季启动应用程序

@springboot应用程序
@骆驼眼追踪
公共类测试应用程序{
@豆子
公共端点routeBuilder routeBuilder(聚合存储库testAggregationRepository,聚合策略testAggregationStrategy){
返回新的EndpointRouteBuilder(){
public void configure()引发异常{
从(文件(“d:/tmp/camel/”).to(文件(“d:/tmp/backup”).unmarshal().json().multicast().to(直接(“聚合”),直接(“聚合”);
从(直接(“聚合”).aggregate(标题(“CamelFileName”)、testAggregationStrategy)、aggregationRepository(测试聚合存储库)、completionSize(2).到(直接(“输出”);
from(直接(“输出”)).stop();
}
};
}
@豆子
公共聚合存储库testAggregationRepository(最终平台TransactionManager平台TransactionManager,最终数据源数据源){
final JdbcAggregationRepository repository=新的JdbcAggregationRepository();
setRepositoryName(“测试集合”);
setTransactionManager(platformTransactionManager);
setDataSource(dataSource);
返回存储库;
}
@豆子
公共聚合策略testAggregationStrategy(){
返回新的聚合策略(){
公共交换聚合(交换旧交换、交换新交换){
返回oldExchange==null?newExchange:oldExchange;
}
};
}
公共静态void main(字符串[]args){
run(TestApplication.class,args);
}
}
日志

INFO 5128 --- [//d:/tmp/camel/] i.j.internal.reporters.LoggingReporter   : Span reported: 6236476473ecdbfb:ec779aef59f2cf8e:6236476473ecdbfb:1 - file
INFO 5128 --- [//d:/tmp/camel/] i.j.internal.reporters.LoggingReporter   : Span reported: 6236476473ecdbfb:53319f61d8a8c361:6236476473ecdbfb:1 - aggregate
INFO 5128 --- [//d:/tmp/camel/] i.j.internal.reporters.LoggingReporter   : Span reported: 6236476473ecdbfb:6b9ae71954dff9be:ec779aef59f2cf8e:1 - output
INFO 5128 --- [//d:/tmp/camel/] i.j.internal.reporters.LoggingReporter   : Span reported: 6236476473ecdbfb:909adb98d6a87cb6:6236476473ecdbfb:1 - aggregate
INFO 5128 --- [//d:/tmp/camel/] i.j.internal.reporters.LoggingReporter   : Span reported: 6236476473ecdbfb:6236476473ecdbfb:0:1 - file
另见

研究

如果我从路由中删除
.to(文件(“d:/tmp/backup”)
,我也会丢失跟踪ID。具有直接
输出的路由的跨距使用新的跟踪ID。因此,它与其他跨距分开

问题

聚合后如何保留父范围