opentelemetry-cpp

OpenTelemetry is a collection of tools, APIs, and SDKs. Use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) to help you analyze your software’s performance and behavior.

Latest version: 1.28.0

Add to xmake.lua

add_requires("opentelemetry-cpp 1.28.0")

Learn how to add and link packages with Xmake →

Information

License
Apache-2.0
Recipe updated
2026-07-28T04:50:44.000Z

Platforms

  • wasm: wasm32, wasm64
  • msys: i386, x86_64
  • mingw: i386, x86_64, arm, arm64
  • windows: x86, x64, arm, arm64, arm64ec
  • linux: i386, x86_64, armv7, armv7s, arm64, mips, mips64, mipsel, mips64el, loong64, riscv64, s390x, ppc, ppc64, ppc64el, sparc64
  • bsd: i386, x86_64, arm, arm64, ppc, ppc64, ppc64el, riscv64, sparc64
  • harmony: armeabi-v7a, arm64-v8a, x86, x86_64
  • android: armeabi, armeabi-v7a, arm64-v8a, riscv64, x86, x86_64, mips, mip64
  • macosx: x86_64, arm64

Options

abi_version_2
Sets the package ABI version from 1 to 2. · Type: boolean · Default: false
abseil
Whether to use Abseil for C++latest features. (not supported for >= v1.21.0) · Type: boolean · Default: false
api_only
Only build the API (use as a header-only library). Overrides all options to enable exporters. · Type: boolean · Default: false
cxx_standard
Select c++ standard to build. · Type: string · Default: 23 · Values: 11, 14, 17, 20, 23, 26
otlp_file
Whether to include the OTLP file exporter in the SDK. · Type: boolean · Default: false
otlp_grpc
Whether to include the OTLP gRPC exporter in the SDK. · Type: boolean · Default: false
otlp_http
Whether to include the OTLP http exporter in the SDK. · Type: boolean · Default: false
prometheus
Enable building prometheus exporter. · Type: boolean · Default: false
stl
Which version of the Standard Library for C++ to use. (true, false, cxx11, cxx14, cxx17, cxx20 or cxx23) · Type: string · Default: false · Values: true, false, cxx11, cxx14, cxx17, cxx20, cxx23, cxx26

Versions

  • v1.16.1
  • v1.19.0
  • v1.21.0
  • v1.22.0
  • v1.23.0
  • v1.24.0
  • v1.25.0
  • v1.26.0
  • v1.27.0
  • v1.28.0

Dependencies

Install with xrepo

Install the package independently of a project and inspect its available configuration.

install

xrepo install "opentelemetry-cpp 1.28.0"

show info

xrepo info "opentelemetry-cpp"

Link a library to your target

Declare the requirement, then attach the library to the target that uses it.

xmake.lua

add_requires("opentelemetry-cpp 1.28.0")

target("demo")
    set_kind("binary")
    add_files("src/*.cpp")
    add_packages("opentelemetry-cpp")

Open a package environment

Open a shell with the environment exported by this package. Use the executable names documented by the package.

enter shell

xrepo env -b "opentelemetry-cpp 1.28.0" shell