open-telemetry/opentelemetry-cpp

GitHub: open-telemetry/opentelemetry-cpp

OpenTelemetry 的 C++ 客户端库,为 C++ 应用提供统一的追踪、指标和日志遥测数据采集能力。

Stars: 1242 | Forks: 548

# OpenTelemetry C++ [![Slack](https://img.shields.io/badge/slack-@cncf/otel/cpp-brightgreen.svg?logo=slack)](https://cloud-native.slack.com/archives/C01N3AT62SJ) [![codecov.io](https://codecov.io/gh/open-telemetry/opentelemetry-cpp/branch/main/graphs/badge.svg?)](https://codecov.io/gh/open-telemetry/opentelemetry-cpp/) [![构建 状态](https://static.pigsec.cn/wp-content/uploads/repos/2026/04/8735159e62194136.svg)](https://github.com/open-telemetry/opentelemetry-cpp/actions) [![发布](https://img.shields.io/github/v/release/open-telemetry/opentelemetry-cpp?include_prereleases&style=)](https://github.com/open-telemetry/opentelemetry-cpp/releases/) [![FOSSA 许可证状态](https://app.fossa.com/api/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-cpp.svg?type=shield&issueType=license)](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-cpp?ref=badge_shield&issueType=license) [![FOSSA 安全状态](https://app.fossa.com/api/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-cpp.svg?type=shield&issueType=security)](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-cpp?ref=badge_shield&issueType=security) [![OpenSSF 记分卡](https://api.scorecard.dev/projects/github.com/open-telemetry/opentelemetry-cpp/badge)](https://scorecard.dev/viewer/?uri=github.com/open-telemetry/opentelemetry-cpp) C++ [OpenTelemetry](https://opentelemetry.io/) 客户端。 ## 项目状态 在所有 3 种信号(即 `Logs`、`Metrics` 和 `Traces`)上均保持**稳定**。 请参阅 [规范合规性 矩阵](https://github.com/open-telemetry/opentelemetry-specification/blob/main/spec-compliance-matrix.md) 以了解此仓库中已实现规范的哪些部分。 ## 支持的 C++ 版本 此仓库发布的代码通常支持以下版本的 C++ 标准: * ISO/IEC 14882:2014 (C++14) * ISO/IEC 14882:2017 (C++17) * ISO/IEC 14882:2020 (C++20) 任何例外情况均在各个 `README.md` 文件中注明。 请注意,支持 [C 编程 语言](https://en.wikipedia.org/wiki/C_(programming_language)) 并非当前项目的 目标。 ## 支持的开发平台 我们的 CI 流水线在以下 `x86-64` 平台上进行构建和测试: | 平台 | 构建类型 | |---------------------------------------------------------------------|---------------| | ubuntu-22.04 (GCC 10, GCC 12, Clang 14) | CMake, Bazel | | ubuntu-20.04 (GCC 9.4.0 - 默认编译器) | CMake, Bazel | | ubuntu-20.04 (GCC 9.4.0 附带 -std=c++14/17/20 标志) | CMake, Bazel | | macOS 12.7 (Xcode 14.2) | Bazel | | Windows Server 2019 (Visual Studio Enterprise 2019) | CMake, Bazel | | Windows Server 2022 (Visual Studio Enterprise 2022) | CMake | 通常,此仓库发布的代码应能在所有具有 支持 [C++ 标准](#supported-c-versions) 的 C++ 编译器平台上进行构建。 ## 依赖项 有关 OSS 依赖项和许可证要求,请参阅 [Dependencies.md](docs/dependencies.md)。 ## 安装 请参阅 [INSTALL.md](./INSTALL.md)。 ### Bazel Central Registry 此项目可在 [Bazel Central Registry (BCR)](https://github.com/bazelbuild/bazel-central-registry/tree/main/modules/opentelemetry-cpp) 中找到。 要将其与 Bazel 一起使用,请将以下内容添加到您的 `MODULE.bazel` 文件中: ``` bazel_dep(name = "opentelemetry-cpp", version = "x.y.z") ``` 有关最新版本,请参阅 [BCR: opentelemetry-cpp](https://github.com/bazelbuild/bazel-central-registry/tree/main/modules/opentelemetry-cpp)。 ## 快速开始 作为应用程序所有者或库作者,您可以在 [opentelemetry-cpp.readthedocs.io](https://opentelemetry-cpp.readthedocs.io/en/latest/) 上找到快速入门指南和参考文档。 `examples/simple` 目录包含了一个最小化程序,演示了如何 使用简单的 `processor` 和控制台 `exporter` 来检测一个小型库, 以及用于 CMake 和 Bazel 的构建文件。 ### 维护者 * [Doug Barker](https://github.com/dbarker) * [Ehsan Saei](https://github.com/esigo) * [Lalit Kumar Bhasin](https://github.com/lalitb),Microsoft * [Marc Alff](https://github.com/marcalff),Oracle * [Tom Tan](https://github.com/ThomsonTan),Microsoft 有关维护者角色的更多信息,请参阅[社区仓库](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer)。 ### 批准者 * [Josh Suereth](https://github.com/jsuereth),Google * [Pranav Sharma](https://github.com/psx95),Google * [WenTao Ou](https://github.com/owent),Tencent 有关批准者角色的更多信息,请参阅[社区仓库](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver)。 ### 荣誉 emeritus * [Alolita Sharma](https://github.com/alolita),分类者 (Triager) * [Emil Mikulic](https://github.com/g-easy),维护者 (Maintainer) * [Jodee Varney](https://github.com/jodeev),分类者 (Triager) * [Johannes Tax](https://github.com/pyohannes),批准者 (Approver) * [Max Golovanov](https://github.com/maxgolov),批准者 (Approver) * [Reiley Yang](https://github.com/reyang),维护者 (Maintainer) * [Ryan Burn](https://github.com/rnburn),批准者 (Approver) 有关 emeritus 角色的更多信息,请参阅[社区仓库](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#emeritus-maintainerapprovertriager)。 ### 感谢所有贡献者 [![contributors](https://contributors-img.web.app/image?repo=open-telemetry/opentelemetry-cpp)](https://github.com/open-telemetry/opentelemetry-cpp/graphs/contributors) ## 发布时间表 有关现有发布版本, 请参阅[发布说明](https://github.com/open-telemetry/opentelemetry-cpp/releases)。 有关即将发布的版本的详细信息, 请参阅[项目里程碑](https://github.com/open-telemetry/opentelemetry-cpp/milestones)。 问题 (issues) 和里程碑中描述的日期和特性仅为估算, 并且可能会发生变化。
标签:API, API集成, Bash脚本, C++, C++14, C++17, C++20, CNCF, GET参数, HTTP头分析, OpenTelemetry, web渗透, 分布式追踪, 可观测性, 开源, 性能监控, 指标, 数据擦除, 日志, 用户代理, 软件开发, 遥测, 链路追踪