如何进行单位测试Newrelic GO代理
我是Golang和Newrelic的新手。
作为工作的一部分,我将Newrelic GO代理迁移到V3版本。
但是我在以下情况下面临问题。
在进行单元测试时
现有的GO代理 1.我们能够伪造应用程序和伪造新的转移。 2.因此,我们能够计算启动序列的电话数量
,但是使用了新版本的GO代理,
- 我无法伪造交易,因此我无法计算起始段
- 如何模拟Newrelic GO代理以进行单位测试? 您能帮我帮助我使用Golang测试新事务
I am new to golang and newrelic.
as part of my work i am migrating newrelic go agent to V3 Version.
But I am facing the problem in the below situation.
while doing unit testing
existing go agent
1.we are able to fake application and fake newrelic transcation.
2.so we were able to count the number of calls to StartSegmentNow
but with the new version of the go agent
- I am unable to fake the transaction so I can't count on the StartSegment
- how to mock the newrelic go agent for unit-testing?
could you please help me with how can I unit test the newrelic transaction using golang
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论