简体   繁体   English

DataDog api - 发送堆栈跟踪

[英]DataDog api - sending a stack trace

Im replacing our existing NewRelic java support code with DataDog and am wondering about sending error messages. 我用DataDog替换现有的NewRelic java支持代码,我想知道发送错误消息。 NewRelic has the .noticeEvent() call. NewRelic具有.noticeEvent()调用。 The DDog library Im using has a .recordEvent() but doesn't seem to have a way to send a stack trace. 我使用的DDog库有一个.recordEvent()但似乎没有办法发送堆栈跟踪。

Anyone been down this road before? 以前有人走过这条路吗? I can send text via the above but I need a bit more info. 我可以通过上面发送文本,但我需要更多的信息。

I am not familiar with the products and libraries that you are using, but there is an open source library MgntUtils that can extract full or filtered stacktrace from exception as a String. 我不熟悉您正在使用的产品和库,但有一个开源库MgntUtils可以从异常中提取完整或过滤的堆栈跟踪作为String。 Since you mentioned that you can pass the text (ie String) this library may help you. 既然你提到你可以传递文本(即字符串),这个库可能会帮助你。 Here are the links to MgntUtils library: 以下是MgntUtils库的链接:

  1. https://www.linkedin.com/pulse/open-source-java-library-some-useful-utilities-michael-gantman?trk=pulse_spock-articles Detailed article that explains what utilities are available in MgntUtils library and how to use them https://www.linkedin.com/pulse/open-source-java-library-some-useful-utilities-michael-gantman?trk=pulse_spock-articles详细文章介绍了MgntUtils库中可用的实用程序以及如何使用他们
  2. http://search.maven.org/#search%7Cga%7C1%7Cmichaelgantman - Here you can get it as Maven resource (also library, source and Javadoc available as a separate resource) http://search.maven.org/#search%7Cga%7C1%7Cmichaelgantman - 在这里您可以将其作为Maven资源(也可以将库,源和Javadoc作为单独的资源提供)
  3. Github: https://github.com/michaelgantman/Mgnt - Here you can get this library as a git project as well as Jars for library itself, sources and javadoc (each in separate jar) Github: https//github.com/michaelgantman/Mgnt - 在这里你可以将这个库作为git项目以及库本身的jars,来源和javadoc(每个都在单独的jar中)

I hope this helps 我希望这有帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM