4.3. Debug Exporter


Debug Exporter 将 trace 和 metrics 打印到标准输出。

OpenTelemetry Collector 自定义资源带有启用的 Debug Exporter

# ...
  config:
    exporters:
      debug:
        verbosity: detailed 
1

        sampling_initial: 5 
2

        sampling_thereafter: 200 
3

        use_internal_logger: true 
4

    service:
      pipelines:
        traces:
          exporters: [debug]
        metrics:
          exporters: [debug]
# ...
Copy to Clipboard Toggle word wrap

1
debug 导出的详细程度为:detailednormalbasic。当设置为 detailed 时,管道数据会被详细记录。默认为 normal
2
每秒日志记录的初始消息数。默认值为每秒 2 个消息。
3
在初始消息数后的抽样率,sampling_initial 中的值已被记录。默认禁用,默认值为 1。使用大于 1 的值启用抽样。如需更多信息,请参阅 Go Project 网站上 zapcore 软件包中的 sampler 函数页。
4
当设置为 true 时,为导出器启用 Collector 内部日志记录器的输出。
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部