新的遗物TypeError:NR.startSegment(...)不是函数

时间:2019-07-15 10:52:05

标签: newrelic newrelic-platform

我正在使用新的遗物startSegment()函数,但是它给了我以下错误:

TypeError: NR.startSegment(...) is not a function

新遗物版本:5.10.0

所有其他功能,例如addCustomAttributes()startBackgroundTransaction()都可以正常工作。

任何人都不知道startSegment()为何只给我错误。我尝试过使用startBackgroundTransaction()函数,但还是没有运气。

NR.startBackgroundTransaction("Test", () => {
    var transaction = NR.getTransaction();
    this.log.info("I am inside start Background Transaction");
    NR.startSegment('Test', false, () => {
        this.log.info("I am inside start segment");
    })();
    transaction.end();
});

0 个答案:

没有答案