diff --git a/ci/cloudbuild/builds/demo-install.sh b/ci/cloudbuild/builds/demo-install.sh index 2e055514d1c1b..84b383c179591 100755 --- a/ci/cloudbuild/builds/demo-install.sh +++ b/ci/cloudbuild/builds/demo-install.sh @@ -51,7 +51,7 @@ cmake -S . -B cmake-out \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ -DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES=OFF \ - -DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__ + -DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__,opentelemetry cmake --build cmake-out -- -j "$(nproc)" cmake --build cmake-out --target install ## [DONE packaging.md] diff --git a/ci/cloudbuild/dockerfiles/demo-alpine-stable.Dockerfile b/ci/cloudbuild/dockerfiles/demo-alpine-stable.Dockerfile index 7f9668a16b656..962b6c7df0e34 100644 --- a/ci/cloudbuild/dockerfiles/demo-alpine-stable.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-alpine-stable.Dockerfile @@ -74,6 +74,28 @@ RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ cmake --build cmake-out --target install -- -j ${NCPU:-4} # ``` +# #### opentelemetry-cpp + +# The project has an **optional** dependency on the OpenTelemetry library. +# We recommend installing this library because: +# - the dependency will become required in the google-cloud-cpp v3.x series. +# - it is needed to produce distributed traces of the library. + +# ```bash +WORKDIR /var/tmp/build/opentelemetry-cpp +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=yes \ + -DWITH_EXAMPLES=OFF \ + -DWITH_ABSEIL=ON \ + -DBUILD_TESTING=OFF \ + -DOPENTELEMETRY_INSTALL=ON \ + -S . -B cmake-out && \ + cmake --build cmake-out --target install -- -j ${NCPU:-4} +# ``` + ## [DONE packaging.md] WORKDIR /var/tmp/sccache diff --git a/ci/cloudbuild/dockerfiles/demo-centos-7.Dockerfile b/ci/cloudbuild/dockerfiles/demo-centos-7.Dockerfile index ac2b65abdba3b..fe31a6988db26 100644 --- a/ci/cloudbuild/dockerfiles/demo-centos-7.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-centos-7.Dockerfile @@ -213,6 +213,29 @@ RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.2.tar.gz | \ ldconfig # ``` +# #### opentelemetry-cpp + +# The project has an **optional** dependency on the OpenTelemetry library. +# We recommend installing this library because: +# - the dependency will become required in the google-cloud-cpp v3.x series. +# - it is needed to produce distributed traces of the library. + +# ```bash +WORKDIR /var/tmp/build/opentelemetry-cpp +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=yes \ + -DWITH_EXAMPLES=OFF \ + -DWITH_ABSEIL=ON \ + -DBUILD_TESTING=OFF \ + -DOPENTELEMETRY_INSTALL=ON \ + -S . -B cmake-out && \ + cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ + ldconfig +# ``` + ## [DONE packaging.md] WORKDIR /var/tmp/sccache diff --git a/ci/cloudbuild/dockerfiles/demo-debian-bookworm.Dockerfile b/ci/cloudbuild/dockerfiles/demo-debian-bookworm.Dockerfile index 59bcef4d8ce13..7ac8ba862e87a 100644 --- a/ci/cloudbuild/dockerfiles/demo-debian-bookworm.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-debian-bookworm.Dockerfile @@ -79,6 +79,29 @@ RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ ldconfig # ``` +# #### opentelemetry-cpp + +# The project has an **optional** dependency on the OpenTelemetry library. +# We recommend installing this library because: +# - the dependency will become required in the google-cloud-cpp v3.x series. +# - it is needed to produce distributed traces of the library. + +# ```bash +WORKDIR /var/tmp/build/opentelemetry-cpp +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=yes \ + -DWITH_EXAMPLES=OFF \ + -DWITH_ABSEIL=ON \ + -DBUILD_TESTING=OFF \ + -DOPENTELEMETRY_INSTALL=ON \ + -S . -B cmake-out && \ + cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ + ldconfig +# ``` + ## [DONE packaging.md] WORKDIR /var/tmp/sccache diff --git a/ci/cloudbuild/dockerfiles/demo-debian-bullseye.Dockerfile b/ci/cloudbuild/dockerfiles/demo-debian-bullseye.Dockerfile index f84833fbbacdc..3498df3a8f44b 100644 --- a/ci/cloudbuild/dockerfiles/demo-debian-bullseye.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-debian-bullseye.Dockerfile @@ -151,6 +151,29 @@ RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.59.2.tar.gz | \ ldconfig # ``` +# #### opentelemetry-cpp + +# The project has an **optional** dependency on the OpenTelemetry library. +# We recommend installing this library because: +# - the dependency will become required in the google-cloud-cpp v3.x series. +# - it is needed to produce distributed traces of the library. + +# ```bash +WORKDIR /var/tmp/build/opentelemetry-cpp +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=yes \ + -DWITH_EXAMPLES=OFF \ + -DWITH_ABSEIL=ON \ + -DBUILD_TESTING=OFF \ + -DOPENTELEMETRY_INSTALL=ON \ + -S . -B cmake-out && \ + cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ + ldconfig +# ``` + ## [DONE packaging.md] WORKDIR /var/tmp/sccache diff --git a/ci/cloudbuild/dockerfiles/demo-debian-buster.Dockerfile b/ci/cloudbuild/dockerfiles/demo-debian-buster.Dockerfile index 24957b92abeb0..9cea49ffab541 100644 --- a/ci/cloudbuild/dockerfiles/demo-debian-buster.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-debian-buster.Dockerfile @@ -162,6 +162,29 @@ RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.59.2.tar.gz | \ ldconfig # ``` +# #### opentelemetry-cpp + +# The project has an **optional** dependency on the OpenTelemetry library. +# We recommend installing this library because: +# - the dependency will become required in the google-cloud-cpp v3.x series. +# - it is needed to produce distributed traces of the library. + +# ```bash +WORKDIR /var/tmp/build/opentelemetry-cpp +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=yes \ + -DWITH_EXAMPLES=OFF \ + -DWITH_ABSEIL=ON \ + -DBUILD_TESTING=OFF \ + -DOPENTELEMETRY_INSTALL=ON \ + -S . -B cmake-out && \ + cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ + ldconfig +# ``` + ## [DONE packaging.md] WORKDIR /var/tmp/sccache diff --git a/ci/cloudbuild/dockerfiles/demo-fedora.Dockerfile b/ci/cloudbuild/dockerfiles/demo-fedora.Dockerfile index 859df781c64e8..bf9744b062ebc 100644 --- a/ci/cloudbuild/dockerfiles/demo-fedora.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-fedora.Dockerfile @@ -90,6 +90,29 @@ RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.2.tar.gz | \ ldconfig # ``` +# #### opentelemetry-cpp + +# The project has an **optional** dependency on the OpenTelemetry library. +# We recommend installing this library because: +# - the dependency will become required in the google-cloud-cpp v3.x series. +# - it is needed to produce distributed traces of the library. + +# ```bash +WORKDIR /var/tmp/build/opentelemetry-cpp +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=yes \ + -DWITH_EXAMPLES=OFF \ + -DWITH_ABSEIL=ON \ + -DBUILD_TESTING=OFF \ + -DOPENTELEMETRY_INSTALL=ON \ + -S . -B cmake-out && \ + cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ + ldconfig +# ``` + ## [DONE packaging.md] WORKDIR /var/tmp/sccache diff --git a/ci/cloudbuild/dockerfiles/demo-opensuse-leap.Dockerfile b/ci/cloudbuild/dockerfiles/demo-opensuse-leap.Dockerfile index 8510fa79a840d..f46f6dc152df8 100644 --- a/ci/cloudbuild/dockerfiles/demo-opensuse-leap.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-opensuse-leap.Dockerfile @@ -173,6 +173,29 @@ RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.2.tar.gz | \ ldconfig # ``` +# #### opentelemetry-cpp + +# The project has an **optional** dependency on the OpenTelemetry library. +# We recommend installing this library because: +# - the dependency will become required in the google-cloud-cpp v3.x series. +# - it is needed to produce distributed traces of the library. + +# ```bash +WORKDIR /var/tmp/build/opentelemetry-cpp +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=yes \ + -DWITH_EXAMPLES=OFF \ + -DWITH_ABSEIL=ON \ + -DBUILD_TESTING=OFF \ + -DOPENTELEMETRY_INSTALL=ON \ + -S . -B cmake-out && \ + cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ + ldconfig +# ``` + # Use the following environment variables to configure the compiler used by # CMake. diff --git a/ci/cloudbuild/dockerfiles/demo-rockylinux-8.Dockerfile b/ci/cloudbuild/dockerfiles/demo-rockylinux-8.Dockerfile index 274567180a541..0817e64fcf356 100644 --- a/ci/cloudbuild/dockerfiles/demo-rockylinux-8.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-rockylinux-8.Dockerfile @@ -193,6 +193,29 @@ RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.2.tar.gz | \ ldconfig # ``` +# #### opentelemetry-cpp + +# The project has an **optional** dependency on the OpenTelemetry library. +# We recommend installing this library because: +# - the dependency will become required in the google-cloud-cpp v3.x series. +# - it is needed to produce distributed traces of the library. + +# ```bash +WORKDIR /var/tmp/build/opentelemetry-cpp +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=yes \ + -DWITH_EXAMPLES=OFF \ + -DWITH_ABSEIL=ON \ + -DBUILD_TESTING=OFF \ + -DOPENTELEMETRY_INSTALL=ON \ + -S . -B cmake-out && \ + cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ + ldconfig +# ``` + ## [DONE packaging.md] WORKDIR /var/tmp/sccache diff --git a/ci/cloudbuild/dockerfiles/demo-rockylinux-9.Dockerfile b/ci/cloudbuild/dockerfiles/demo-rockylinux-9.Dockerfile index e1e787efd693a..63b9fa8ab9f62 100644 --- a/ci/cloudbuild/dockerfiles/demo-rockylinux-9.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-rockylinux-9.Dockerfile @@ -199,6 +199,29 @@ RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.2.tar.gz | \ ldconfig # ``` +# #### opentelemetry-cpp + +# The project has an **optional** dependency on the OpenTelemetry library. +# We recommend installing this library because: +# - the dependency will become required in the google-cloud-cpp v3.x series. +# - it is needed to produce distributed traces of the library. + +# ```bash +WORKDIR /var/tmp/build/opentelemetry-cpp +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=yes \ + -DWITH_EXAMPLES=OFF \ + -DWITH_ABSEIL=ON \ + -DBUILD_TESTING=OFF \ + -DOPENTELEMETRY_INSTALL=ON \ + -S . -B cmake-out && \ + cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ + ldconfig +# ``` + ## [DONE packaging.md] WORKDIR /var/tmp/sccache diff --git a/ci/cloudbuild/dockerfiles/demo-ubuntu-focal.Dockerfile b/ci/cloudbuild/dockerfiles/demo-ubuntu-focal.Dockerfile index 123f8579898ce..94fca3053fb0b 100644 --- a/ci/cloudbuild/dockerfiles/demo-ubuntu-focal.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-ubuntu-focal.Dockerfile @@ -164,6 +164,29 @@ RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.2.tar.gz | \ ldconfig # ``` +# #### opentelemetry-cpp + +# The project has an **optional** dependency on the OpenTelemetry library. +# We recommend installing this library because: +# - the dependency will become required in the google-cloud-cpp v3.x series. +# - it is needed to produce distributed traces of the library. + +# ```bash +WORKDIR /var/tmp/build/opentelemetry-cpp +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=yes \ + -DWITH_EXAMPLES=OFF \ + -DWITH_ABSEIL=ON \ + -DBUILD_TESTING=OFF \ + -DOPENTELEMETRY_INSTALL=ON \ + -S . -B cmake-out && \ + cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ + ldconfig +# ``` + ## [DONE packaging.md] WORKDIR /var/tmp/sccache diff --git a/ci/cloudbuild/dockerfiles/demo-ubuntu-jammy.Dockerfile b/ci/cloudbuild/dockerfiles/demo-ubuntu-jammy.Dockerfile index 03f4c48657b44..d7f184481c20f 100644 --- a/ci/cloudbuild/dockerfiles/demo-ubuntu-jammy.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-ubuntu-jammy.Dockerfile @@ -146,6 +146,29 @@ RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.2.tar.gz | \ ldconfig # ``` +# #### opentelemetry-cpp + +# The project has an **optional** dependency on the OpenTelemetry library. +# We recommend installing this library because: +# - the dependency will become required in the google-cloud-cpp v3.x series. +# - it is needed to produce distributed traces of the library. + +# ```bash +WORKDIR /var/tmp/build/opentelemetry-cpp +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=yes \ + -DWITH_EXAMPLES=OFF \ + -DWITH_ABSEIL=ON \ + -DBUILD_TESTING=OFF \ + -DOPENTELEMETRY_INSTALL=ON \ + -S . -B cmake-out && \ + cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ + ldconfig +# ``` + ## [DONE packaging.md] WORKDIR /var/tmp/sccache diff --git a/doc/packaging.md b/doc/packaging.md index bd759843e2760..57e39dbfdea24 100644 --- a/doc/packaging.md +++ b/doc/packaging.md @@ -196,6 +196,29 @@ curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} ``` +#### opentelemetry-cpp + +The project has an **optional** dependency on the OpenTelemetry library. We +recommend installing this library because: + +- the dependency will become required in the google-cloud-cpp v3.x series. +- it is needed to produce distributed traces of the library. + +```bash +mkdir -p $HOME/Downloads/opentelemetry-cpp && cd $HOME/Downloads/opentelemetry-cpp +curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=yes \ + -DWITH_EXAMPLES=OFF \ + -DWITH_ABSEIL=ON \ + -DBUILD_TESTING=OFF \ + -DOPENTELEMETRY_INSTALL=ON \ + -S . -B cmake-out && \ +sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} +``` + #### Compile and install the main project We can now compile and install `google-cloud-cpp`: @@ -208,7 +231,7 @@ cmake -S . -B cmake-out \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ -DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES=OFF \ - -DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__ + -DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__,opentelemetry cmake --build cmake-out -- -j "$(nproc)" cmake --build cmake-out --target install ``` @@ -293,6 +316,30 @@ sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ sudo ldconfig ``` +#### opentelemetry-cpp + +The project has an **optional** dependency on the OpenTelemetry library. We +recommend installing this library because: + +- the dependency will become required in the google-cloud-cpp v3.x series. +- it is needed to produce distributed traces of the library. + +```bash +mkdir -p $HOME/Downloads/opentelemetry-cpp && cd $HOME/Downloads/opentelemetry-cpp +curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=yes \ + -DWITH_EXAMPLES=OFF \ + -DWITH_ABSEIL=ON \ + -DBUILD_TESTING=OFF \ + -DOPENTELEMETRY_INSTALL=ON \ + -S . -B cmake-out && \ +sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ +sudo ldconfig +``` + #### Compile and install the main project We can now compile and install `google-cloud-cpp`: @@ -305,7 +352,7 @@ cmake -S . -B cmake-out \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ -DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES=OFF \ - -DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__ + -DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__,opentelemetry cmake --build cmake-out -- -j "$(nproc)" cmake --build cmake-out --target install ``` @@ -471,6 +518,30 @@ sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ sudo ldconfig ``` +#### opentelemetry-cpp + +The project has an **optional** dependency on the OpenTelemetry library. We +recommend installing this library because: + +- the dependency will become required in the google-cloud-cpp v3.x series. +- it is needed to produce distributed traces of the library. + +```bash +mkdir -p $HOME/Downloads/opentelemetry-cpp && cd $HOME/Downloads/opentelemetry-cpp +curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=yes \ + -DWITH_EXAMPLES=OFF \ + -DWITH_ABSEIL=ON \ + -DBUILD_TESTING=OFF \ + -DOPENTELEMETRY_INSTALL=ON \ + -S . -B cmake-out && \ +sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ +sudo ldconfig +``` + Use the following environment variables to configure the compiler used by CMake. export CXX=g++-8 @@ -489,7 +560,7 @@ cmake -S . -B cmake-out \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ -DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES=OFF \ - -DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__ + -DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__,opentelemetry cmake --build cmake-out -- -j "$(nproc)" cmake --build cmake-out --target install ``` @@ -627,6 +698,30 @@ sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ sudo ldconfig ``` +#### opentelemetry-cpp + +The project has an **optional** dependency on the OpenTelemetry library. We +recommend installing this library because: + +- the dependency will become required in the google-cloud-cpp v3.x series. +- it is needed to produce distributed traces of the library. + +```bash +mkdir -p $HOME/Downloads/opentelemetry-cpp && cd $HOME/Downloads/opentelemetry-cpp +curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=yes \ + -DWITH_EXAMPLES=OFF \ + -DWITH_ABSEIL=ON \ + -DBUILD_TESTING=OFF \ + -DOPENTELEMETRY_INSTALL=ON \ + -S . -B cmake-out && \ +sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ +sudo ldconfig +``` + #### Compile and install the main project We can now compile and install `google-cloud-cpp`: @@ -639,7 +734,7 @@ cmake -S . -B cmake-out \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ -DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES=OFF \ - -DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__ + -DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__,opentelemetry cmake --build cmake-out -- -j "$(nproc)" cmake --build cmake-out --target install ``` @@ -796,6 +891,30 @@ sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ sudo ldconfig ``` +#### opentelemetry-cpp + +The project has an **optional** dependency on the OpenTelemetry library. We +recommend installing this library because: + +- the dependency will become required in the google-cloud-cpp v3.x series. +- it is needed to produce distributed traces of the library. + +```bash +mkdir -p $HOME/Downloads/opentelemetry-cpp && cd $HOME/Downloads/opentelemetry-cpp +curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=yes \ + -DWITH_EXAMPLES=OFF \ + -DWITH_ABSEIL=ON \ + -DBUILD_TESTING=OFF \ + -DOPENTELEMETRY_INSTALL=ON \ + -S . -B cmake-out && \ +sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ +sudo ldconfig +``` + #### Compile and install the main project We can now compile and install `google-cloud-cpp`: @@ -808,7 +927,7 @@ cmake -S . -B cmake-out \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ -DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES=OFF \ - -DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__ + -DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__,opentelemetry cmake --build cmake-out -- -j "$(nproc)" cmake --build cmake-out --target install ``` @@ -880,6 +999,30 @@ sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ sudo ldconfig ``` +#### opentelemetry-cpp + +The project has an **optional** dependency on the OpenTelemetry library. We +recommend installing this library because: + +- the dependency will become required in the google-cloud-cpp v3.x series. +- it is needed to produce distributed traces of the library. + +```bash +mkdir -p $HOME/Downloads/opentelemetry-cpp && cd $HOME/Downloads/opentelemetry-cpp +curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=yes \ + -DWITH_EXAMPLES=OFF \ + -DWITH_ABSEIL=ON \ + -DBUILD_TESTING=OFF \ + -DOPENTELEMETRY_INSTALL=ON \ + -S . -B cmake-out && \ +sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ +sudo ldconfig +``` + #### Compile and install the main project We can now compile and install `google-cloud-cpp`: @@ -892,7 +1035,7 @@ cmake -S . -B cmake-out \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ -DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES=OFF \ - -DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__ + -DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__,opentelemetry cmake --build cmake-out -- -j "$(nproc)" cmake --build cmake-out --target install ``` @@ -1037,6 +1180,30 @@ sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ sudo ldconfig ``` +#### opentelemetry-cpp + +The project has an **optional** dependency on the OpenTelemetry library. We +recommend installing this library because: + +- the dependency will become required in the google-cloud-cpp v3.x series. +- it is needed to produce distributed traces of the library. + +```bash +mkdir -p $HOME/Downloads/opentelemetry-cpp && cd $HOME/Downloads/opentelemetry-cpp +curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=yes \ + -DWITH_EXAMPLES=OFF \ + -DWITH_ABSEIL=ON \ + -DBUILD_TESTING=OFF \ + -DOPENTELEMETRY_INSTALL=ON \ + -S . -B cmake-out && \ +sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ +sudo ldconfig +``` + #### Compile and install the main project We can now compile and install `google-cloud-cpp`: @@ -1049,7 +1216,7 @@ cmake -S . -B cmake-out \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ -DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES=OFF \ - -DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__ + -DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__,opentelemetry cmake --build cmake-out -- -j "$(nproc)" cmake --build cmake-out --target install ``` @@ -1204,6 +1371,30 @@ sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ sudo ldconfig ``` +#### opentelemetry-cpp + +The project has an **optional** dependency on the OpenTelemetry library. We +recommend installing this library because: + +- the dependency will become required in the google-cloud-cpp v3.x series. +- it is needed to produce distributed traces of the library. + +```bash +mkdir -p $HOME/Downloads/opentelemetry-cpp && cd $HOME/Downloads/opentelemetry-cpp +curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=yes \ + -DWITH_EXAMPLES=OFF \ + -DWITH_ABSEIL=ON \ + -DBUILD_TESTING=OFF \ + -DOPENTELEMETRY_INSTALL=ON \ + -S . -B cmake-out && \ +sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ +sudo ldconfig +``` + #### Compile and install the main project We can now compile and install `google-cloud-cpp`: @@ -1216,7 +1407,7 @@ cmake -S . -B cmake-out \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ -DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES=OFF \ - -DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__ + -DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__,opentelemetry cmake --build cmake-out -- -j "$(nproc)" cmake --build cmake-out --target install ``` @@ -1402,6 +1593,30 @@ sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ sudo ldconfig ``` +#### opentelemetry-cpp + +The project has an **optional** dependency on the OpenTelemetry library. We +recommend installing this library because: + +- the dependency will become required in the google-cloud-cpp v3.x series. +- it is needed to produce distributed traces of the library. + +```bash +mkdir -p $HOME/Downloads/opentelemetry-cpp && cd $HOME/Downloads/opentelemetry-cpp +curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=yes \ + -DWITH_EXAMPLES=OFF \ + -DWITH_ABSEIL=ON \ + -DBUILD_TESTING=OFF \ + -DOPENTELEMETRY_INSTALL=ON \ + -S . -B cmake-out && \ +sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ +sudo ldconfig +``` + #### Compile and install the main project We can now compile and install `google-cloud-cpp`: @@ -1414,7 +1629,7 @@ cmake -S . -B cmake-out \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ -DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES=OFF \ - -DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__ + -DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__,opentelemetry cmake --build cmake-out -- -j "$(nproc)" cmake --build cmake-out --target install ``` @@ -1606,6 +1821,30 @@ sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ sudo ldconfig ``` +#### opentelemetry-cpp + +The project has an **optional** dependency on the OpenTelemetry library. We +recommend installing this library because: + +- the dependency will become required in the google-cloud-cpp v3.x series. +- it is needed to produce distributed traces of the library. + +```bash +mkdir -p $HOME/Downloads/opentelemetry-cpp && cd $HOME/Downloads/opentelemetry-cpp +curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=yes \ + -DWITH_EXAMPLES=OFF \ + -DWITH_ABSEIL=ON \ + -DBUILD_TESTING=OFF \ + -DOPENTELEMETRY_INSTALL=ON \ + -S . -B cmake-out && \ +sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ +sudo ldconfig +``` + #### Compile and install the main project We can now compile and install `google-cloud-cpp`: @@ -1618,7 +1857,7 @@ cmake -S . -B cmake-out \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ -DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES=OFF \ - -DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__ + -DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__,opentelemetry cmake --build cmake-out -- -j "$(nproc)" cmake --build cmake-out --target install ``` @@ -1811,6 +2050,30 @@ sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ sudo ldconfig ``` +#### opentelemetry-cpp + +The project has an **optional** dependency on the OpenTelemetry library. We +recommend installing this library because: + +- the dependency will become required in the google-cloud-cpp v3.x series. +- it is needed to produce distributed traces of the library. + +```bash +mkdir -p $HOME/Downloads/opentelemetry-cpp && cd $HOME/Downloads/opentelemetry-cpp +curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=yes \ + -DWITH_EXAMPLES=OFF \ + -DWITH_ABSEIL=ON \ + -DBUILD_TESTING=OFF \ + -DOPENTELEMETRY_INSTALL=ON \ + -S . -B cmake-out && \ +sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ +sudo ldconfig +``` + #### Compile and install the main project We can now compile and install `google-cloud-cpp`: @@ -1823,7 +2086,7 @@ cmake -S . -B cmake-out \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ -DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES=OFF \ - -DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__ + -DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__,opentelemetry cmake --build cmake-out -- -j "$(nproc)" cmake --build cmake-out --target install ``` diff --git a/google/cloud/opentelemetry/quickstart/README.md b/google/cloud/opentelemetry/quickstart/README.md index 82a8e3fc3ad30..89c3699704d67 100644 --- a/google/cloud/opentelemetry/quickstart/README.md +++ b/google/cloud/opentelemetry/quickstart/README.md @@ -116,29 +116,6 @@ To enable these features, add the following to your CMake configuration command: -DGOOGLE_CLOUD_CPP_ENABLE="storage,opentelemetry" ``` -#### Fetching `opentelemetry-cpp` - -Here is an example command to fetch and install `opentelemetry-cpp` on Fedora -Linux. - -```Dockerfile -WORKDIR /var/tmp/build/ -RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.9.0.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_CXX_STANDARD=14 \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \ - -DBUILD_SHARED_LIBS=ON \ - -DWITH_EXAMPLES=OFF \ - -DWITH_ABSEIL=ON \ - -DBUILD_TESTING=OFF \ - -DOPENTELEMETRY_INSTALL=ON \ - -S . -B cmake-out && \ - cmake --build cmake-out --target install && \ - ldconfig && cd /var/tmp && rm -fr build -``` - #### Details We must supply the `-DWITH_ABSEIL=ON` flag when compiling `opentelemetry-cpp`