- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
所以我将 Hystrix-AMQP 的依赖项添加到我的服务中,日志文件变得疯狂,它只是继续记录指标的东西。我需要那个 jar 来实际将它与 turbine-AMQP 一起使用。
这是我的 hystrix gradle 中的内容:-
compile ("org.springframework.cloud:spring-cloud-starter-hystrix:1.0.6.RELEASE")
compile ('org.springframework.cloud:spring-cloud-starter-bus-amqp:1.0.6.RELEASE')
compile ('org.springframework.cloud:spring-cloud-netflix-hystrix-amqp:1.0.7.RELEASE')
compile ('com.netflix.hystrix:hystrix-javanica:1.5.2')
这是在我的日志中不断生成的内容,它一直在运行:-
2016-05-03 13:49:14.698 INFO [LogMessage=Starting span: MilliSpan(begin=1462308554698, end=0, name=execution(HystrixStreamTask.sendMetrics()), traceId=21825112-0c71-4c6a-a9ca-51b11a21e4e5, parents=[], spanId=053946b5-7287-41f4-8579-d048655f41ea, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:14.698 INFO [LogMessage=Continued span: MilliSpan(begin=1462308554698, end=0, name=execution(HystrixStreamTask.sendMetrics()), traceId=21825112-0c71-4c6a-a9ca-51b11a21e4e5, parents=[], spanId=053946b5-7287-41f4-8579-d048655f41ea, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:14.698 INFO [LogMessage=Stopped span: MilliSpan(begin=1462308554698, end=1462308554698, name=execution(HystrixStreamTask.sendMetrics()), traceId=21825112-0c71-4c6a-a9ca-51b11a21e4e5, parents=[], spanId=053946b5-7287-41f4-8579-d048655f41ea, remote=false, annotations={/messaging/headers/id=e1cc5042-1a5c-e3f9-6f3c-de936d1aa959, /messaging/headers/timestamp=1462308554698, /messaging/payload/type=java.lang.String, /messaging/payload/size=592}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:14.698 INFO [LogMessage=Starting span: MilliSpan(begin=1462308554698, end=0, name=execution(HystrixStreamTask.gatherMetrics()), traceId=6cc342bb-9693-493a-8fa8-8a17c2ff06c3, parents=[], spanId=10cdee69-22f8-43ab-883f-3e09b29ab6fb, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:14.699 INFO [LogMessage=Continued span: MilliSpan(begin=1462308554698, end=0, name=execution(HystrixStreamTask.gatherMetrics()), traceId=6cc342bb-9693-493a-8fa8-8a17c2ff06c3, parents=[], spanId=10cdee69-22f8-43ab-883f-3e09b29ab6fb, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:14.699 INFO [LogMessage=Stopped span: MilliSpan(begin=1462308554698, end=1462308554699, name=execution(HystrixStreamTask.gatherMetrics()), traceId=6cc342bb-9693-493a-8fa8-8a17c2ff06c3, parents=[], spanId=10cdee69-22f8-43ab-883f-3e09b29ab6fb, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:15.199 INFO [LogMessage=Starting span: MilliSpan(begin=1462308555199, end=0, name=execution(HystrixStreamTask.sendMetrics()), traceId=4c5fd89d-f5d2-45bf-a727-32a3e1b57c35, parents=[], spanId=c7e254b5-63de-4a00-9d91-1584edd9650c, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:15.199 INFO [LogMessage=Starting span: MilliSpan(begin=1462308555199, end=0, name=execution(HystrixStreamTask.gatherMetrics()), traceId=896e5143-fa67-4fd1-b97e-517282780e94, parents=[], spanId=ee1d4f95-30c1-4784-8366-58c3a73c3565, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:15.199 INFO [LogMessage=Continued span: MilliSpan(begin=1462308555199, end=0, name=execution(HystrixStreamTask.sendMetrics()), traceId=4c5fd89d-f5d2-45bf-a727-32a3e1b57c35, parents=[], spanId=c7e254b5-63de-4a00-9d91-1584edd9650c, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:15.199 INFO [LogMessage=Continued span: MilliSpan(begin=1462308555199, end=0, name=execution(HystrixStreamTask.gatherMetrics()), traceId=896e5143-fa67-4fd1-b97e-517282780e94, parents=[], spanId=ee1d4f95-30c1-4784-8366-58c3a73c3565, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:15.199 INFO [LogMessage=Stopped span: MilliSpan(begin=1462308555199, end=1462308555199, name=execution(HystrixStreamTask.gatherMetrics()), traceId=896e5143-fa67-4fd1-b97e-517282780e94, parents=[], spanId=ee1d4f95-30c1-4784-8366-58c3a73c3565, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:15.200 INFO [LogMessage=Stopped span: MilliSpan(begin=1462308555199, end=1462308555200, name=execution(HystrixStreamTask.sendMetrics()), traceId=4c5fd89d-f5d2-45bf-a727-32a3e1b57c35, parents=[], spanId=c7e254b5-63de-4a00-9d91-1584edd9650c, remote=false, annotations={/messaging/headers/id=4cd7f1c7-0aba-63c3-fddd-aeb5ea9b21e5, /messaging/headers/timestamp=1462308555200, /messaging/payload/type=java.lang.String, /messaging/payload/size=592}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:15.698 INFO [LogMessage=Starting span: MilliSpan(begin=1462308555698, end=0, name=execution(HystrixStreamTask.sendMetrics()), traceId=eb214d13-6e16-4b76-abd7-1217e4932e93, parents=[], spanId=4d9790b0-745a-46a9-99b8-f5d23a570113, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:15.698 INFO [LogMessage=Continued span: MilliSpan(begin=1462308555698, end=0, name=execution(HystrixStreamTask.sendMetrics()), traceId=eb214d13-6e16-4b76-abd7-1217e4932e93, parents=[], spanId=4d9790b0-745a-46a9-99b8-f5d23a570113, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:15.699 INFO [LogMessage=Starting span: MilliSpan(begin=1462308555699, end=0, name=execution(HystrixStreamTask.gatherMetrics()), traceId=8651f8c4-6de8-4a6a-a28e-7d248d6a6ac3, parents=[], spanId=3fa8d40b-e14f-4209-a10b-adc47d03cccd, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:15.699 INFO [LogMessage=Continued span: MilliSpan(begin=1462308555699, end=0, name=execution(HystrixStreamTask.gatherMetrics()), traceId=8651f8c4-6de8-4a6a-a28e-7d248d6a6ac3, parents=[], spanId=3fa8d40b-e14f-4209-a10b-adc47d03cccd, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:15.699 INFO [LogMessage=Stopped span: MilliSpan(begin=1462308555698, end=1462308555699, name=execution(HystrixStreamTask.sendMetrics()), traceId=eb214d13-6e16-4b76-abd7-1217e4932e93, parents=[], spanId=4d9790b0-745a-46a9-99b8-f5d23a570113, remote=false, annotations={/messaging/headers/id=a59cf028-1b92-1a67-c4f2-651fb0f488e0, /messaging/headers/timestamp=1462308555699, /messaging/payload/type=java.lang.String, /messaging/payload/size=592}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:15.700 INFO [LogMessage=Stopped span: MilliSpan(begin=1462308555699, end=1462308555700, name=execution(HystrixStreamTask.gatherMetrics()), traceId=8651f8c4-6de8-4a6a-a28e-7d248d6a6ac3, parents=[], spanId=3fa8d40b-e14f-4209-a10b-adc47d03cccd, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:16.197 INFO [LogMessage=Starting span: MilliSpan(begin=1462308556197, end=0, name=execution(HystrixStreamTask.sendMetrics()), traceId=9599a694-1d0d-40c1-82d5-9c4af32d71d2, parents=[], spanId=0e2b6691-a5ef-40f2-b9ff-00203075f1f0, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:16.197 INFO [LogMessage=Continued span: MilliSpan(begin=1462308556197, end=0, name=execution(HystrixStreamTask.sendMetrics()), traceId=9599a694-1d0d-40c1-82d5-9c4af32d71d2, parents=[], spanId=0e2b6691-a5ef-40f2-b9ff-00203075f1f0, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:16.198 INFO [LogMessage=Stopped span: MilliSpan(begin=1462308556197, end=1462308556198, name=execution(HystrixStreamTask.sendMetrics()), traceId=9599a694-1d0d-40c1-82d5-9c4af32d71d2, parents=[], spanId=0e2b6691-a5ef-40f2-b9ff-00203075f1f0, remote=false, annotations={/messaging/headers/id=78c358eb-547c-9c3f-9b4c-2cd971da2198, /messaging/headers/timestamp=1462308556198, /messaging/payload/type=java.lang.String, /messaging/payload/size=592}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:16.199 INFO [LogMessage=Starting span: MilliSpan(begin=1462308556198, end=0, name=execution(HystrixStreamTask.gatherMetrics()), traceId=bed72154-51a5-4637-b0a8-7b1e5ba352f3, parents=[], spanId=107b9f6d-e97c-4f67-a196-8725293dc1f4, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:16.199 INFO [LogMessage=Continued span: MilliSpan(begin=1462308556198, end=0, name=execution(HystrixStreamTask.gatherMetrics()), traceId=bed72154-51a5-4637-b0a8-7b1e5ba352f3, parents=[], spanId=107b9f6d-e97c-4f67-a196-8725293dc1f4, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:16.199 INFO [LogMessage=Stopped span: MilliSpan(begin=1462308556198, end=1462308556199, name=execution(HystrixStreamTask.gatherMetrics()), traceId=bed72154-51a5-4637-b0a8-7b1e5ba352f3, parents=[], spanId=107b9f6d-e97c-4f67-a196-8725293dc1f4, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:16.698 INFO [LogMessage=Starting span: MilliSpan(begin=1462308556698, end=0, name=execution(HystrixStreamTask.sendMetrics()), traceId=0d5c02ca-91ad-432a-8b6b-ed460e7fbe20, parents=[], spanId=fbf0674d-2610-455a-8cd8-d3602ee50d55, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:16.698 INFO [LogMessage=Starting span: MilliSpan(begin=1462308556698, end=0, name=execution(HystrixStreamTask.gatherMetrics()), traceId=fec97646-fd36-40f2-8708-0c34b96fb32d, parents=[], spanId=12442026-67da-4f8b-9584-8d1fa188b88c, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:16.698 INFO [LogMessage=Continued span: MilliSpan(begin=1462308556698, end=0, name=execution(HystrixStreamTask.sendMetrics()), traceId=0d5c02ca-91ad-432a-8b6b-ed460e7fbe20, parents=[], spanId=fbf0674d-2610-455a-8cd8-d3602ee50d55, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:16.698 INFO [LogMessage=Continued span: MilliSpan(begin=1462308556698, end=0, name=execution(HystrixStreamTask.gatherMetrics()), traceId=fec97646-fd36-40f2-8708-0c34b96fb32d, parents=[], spanId=12442026-67da-4f8b-9584-8d1fa188b88c, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:16.698 INFO [LogMessage=Stopped span: MilliSpan(begin=1462308556698, end=1462308556698, name=execution(HystrixStreamTask.gatherMetrics()), traceId=fec97646-fd36-40f2-8708-0c34b96fb32d, parents=[], spanId=12442026-67da-4f8b-9584-8d1fa188b88c, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:16.699 INFO [LogMessage=Stopped span: MilliSpan(begin=1462308556698, end=1462308556699, name=execution(HystrixStreamTask.sendMetrics()), traceId=0d5c02ca-91ad-432a-8b6b-ed460e7fbe20, parents=[], spanId=fbf0674d-2610-455a-8cd8-d3602ee50d55, remote=false, annotations={/messaging/headers/id=92af5087-ff24-e8b9-94dc-863b1dd17ba2, /messaging/headers/timestamp=1462308556699, /messaging/payload/type=java.lang.String, /messaging/payload/size=592}, processId=null, timelineAnnotations=[])]
2016-05-03 13:49:17.198 INFO [LogMessage=Starting span: MilliSpan(begin=1462308557198, end=0, name=execution(HystrixStreamTask.gatherMetrics()), traceId=e389098b-c606-478f-9b55-b8a7c4cceed5, parents=[], spanId=8fbc4ffd-6e42-4489-baa2-69d42a562c96, remote=false, annotations={}, processId=null, timelineAnnotations=[])]
这是我的 application.yml 中的内容
hystrix:
command.default.execution.isolation.strategy: SEMAPHORE
command.default.execution.isolation.thread.timeoutInMilliseconds: 60000
command.default.execution.timeout.enabled: false
command.default.fallback.enabled: false
threadpool.default.coreSize: 20
如何阻止服务重复生成所有日志。有没有我可以在 application.yml 中设置的某种属性,或者我可以做些什么。
更新:
根据此处的问题- https://github.com/spring-cloud/spring-cloud-sleuth/issues/49,问题似乎是由侦探引起的
我添加了 spring.sleuth.log.slf4j.enabled: false
但问题是它删除了所有跟踪 iD 和跨度 ID,因此添加它确实解决了问题,但我的应用程序日志将被搞乱.
任何建议。
最佳答案
检查最新版本的 Sleuth - 现在这个问题应该不会再出现了。
关于java - 为 Hystrix-AMQP 生成了太多日志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37014311/
我有一个使用 PHP 和 MariaDB 10.3 的小型大型数据库应用程序。 我有大约 100 个表,大约有 3,000 个 View 。 当超过 1,000 个 View 时,数据库架构就会崩溃并
parsing "\(|.*?)|)" - Too many )'s. 写这个的时候我收到这个错误... private static Regex resourceTextsREGEX = new
我有一个Powershell脚本,它会生成一个包含数据的JSON文件。 我对此文件有问题。它产生两倍的“\”! 你知道我该怎么解决吗? 这是我的生成JSON文件的代码: [ordered]@{ pcn
我不确定为什么会收到此错误,我在不同点使用 str.join() 和 os.path.join()在脚本中,这是原因吗? 使用os.path.join: from os.path import get
一段时间后,在我的应用程序中,似乎出现了一个大问题。有一个来自 Box2D 的 b2Bodys 的构建。我确实在我的应用程序中使用了一些 b2Body 来进行碰撞,但我会说屏幕上一次最多有 10 个。
我正在创建一个包含 6 种不同问题类型的简单数学程序。我想让程序随机显示6种类型中的一种,但有些问题应该出现得比较频繁。我使用加权数组,但从加权数组中选择问题类型后,如果不在 if 语句中使用 10
我想构建一个包含大约 400 个单元的 Controller ,4 列,每列 100 个单元。每个单元格都必须被绘制并响应鼠标事件。这个会不会太重了?我应该为每个单元使用另一种方法,如 CALayer
我是 Haskell 的新手,在编写小程序时,我通常会使用太多的 where 子句来检查函数中的许多内容,因此编写 where 子句是一种很好的做法,或者还有其他好的替代方法吗? 例如,在下面的代码中
我有一个 index.js,其中包含一些导出,每个导出仅包含一个函数。我尝试一次部署其中的几个,CLI 给我以下错误; Error: Too many arguments. Run firebase
我在正则表达式上挣扎了几个小时,似乎没有找到最后一点解决方案。我基本上是逐行解析 C 头文件以查找变量。 以下是我可能遇到的需要传递正则表达式的行的情况: //#define variable_nam
我有一个 html 表单,大约有 1500 个输入字段*(文本或隐藏)。form.action 是 POST 并且每个输入字段都有一个唯一的名称(没有 name=foo[])。 每当我在提交表单后尝试
我很困惑 一劳永逸 VS 添加引用(/net 选项卡)说 dll 的 gac 在这里: 我发现这个包含 GAC 的文件夹:(附注:为什么有 3 个 Gac 类型?) 还有这个包含 GAC 的文件夹:
我有一个实现Comparable的对象列表。 我想对此列表进行排序,这就是我使用Comparable的原因。 每个对象都有一个字段 weight,它由另外 3 个成员 int 变量组成。 对于具有最大
在我们的系统中,有多个“站点”通过 WCF 相互通信。每个站点通过 NetTCP 绑定(bind)公开约 20 个接口(interface)。 当一个站点使用对等站点的接口(interface)时,它
我已经从 http://boost.teeks99.com/ 下载了 boost 1.58.0(预编译,x86,VC 12.0)并安装到C:\local\boost_1_58_0(我也试过自己用msv
所以...我有一个查询,该查询返回在我的网站上使用相同的电子邮件地址、密码和其他信息创建的用户帐户(是的,实现不好,不要问)。它通过从另一个程序获取用户 ID 来实现这一点。 我的 SQL 是 SEL
我知道这是一个有点菜鸟的问题,但我只是想问一下,如果我有太多 Controller ,这是好事还是坏事。假设我有一个网络应用程序,它有大约 12 个 View 。每个 View 都有自己的 Contr
我认为我的项目做了一些可笑的错误。我正在制作一个项目,基本上是一组 View Controller ,其中一些 Controller 上有视频,其他 Controller 上有图像。我创建了一个模型,
嘿,我正在创建一个电子商店并显示类别树和所有产品及其多种价格变化,我制作了 150 多个 mysql_query("SELECT ..."); 在一页上查询。 (如果我计算“while”循环)。 是不
我在 JS 方面遇到了问题。我正在尝试制作按类型排序的三个成分列表(用于酿造药水),所有这些都是标签内的复选框。 您应该选择(选中)三个列表中每一个的一个元素才能酿造一剂药水。如果您选择正确的成分并按
我是一名优秀的程序员,十分优秀!