如何从 DataDog APM 遥测中过滤掉(或忽略)用户?

问题描述 投票:0回答:0

我试图从我们的 DataDog APM 中忽略来自特定用户的所有请求的痕迹。为 Node.JS 使用 add-trace 以及这个 plugin。我一直在查看关于自定义过滤器的文档,但我无法让它工作。在示踪剂中,我有以下内容:

tracer.use('graphql', {
    source: true,
    signature: false,
    hooks: {
        // here, I add some tags, including the user ID 
        // so I tried: 
        if (user.id === 'id-to-ignore') {
            span.addTags({
                'ignoreThis': true,
            });
        }
        // but I can't filter by this tag either. 
        // Ideally, I would completely remove it here in the code,
        // but I could compromise on adding something we could filter in the DD APM UI
    }
}

有人成功地完成了这种类型的过滤吗?任何想法将不胜感激。

trace graphql-js datadog telemetry apm
© www.soinside.com 2019 - 2024. All rights reserved.