From f0b5a6b60ad6d7aed68062371bfb886331206d70 Mon Sep 17 00:00:00 2001 From: Mengna Li <95600143+Adela0814@users.noreply.github.com> Date: Fri, 14 Apr 2023 05:58:46 +0800 Subject: [PATCH] [opentelemetry-cpp] Add otlp-grpc (#30770) * Add otlp-grpc * update --- ports/opentelemetry-cpp/portfile.cmake | 5 ++++- ports/opentelemetry-cpp/vcpkg.json | 16 ++++++++++++++-- versions/baseline.json | 2 +- versions/o-/opentelemetry-cpp.json | 5 +++++ 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/ports/opentelemetry-cpp/portfile.cmake b/ports/opentelemetry-cpp/portfile.cmake index a3c60870b6..154a01c2f9 100644 --- a/ports/opentelemetry-cpp/portfile.cmake +++ b/ports/opentelemetry-cpp/portfile.cmake @@ -30,6 +30,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS otlp WITH_OTLP otlp-http WITH_OTLP_HTTP zpages WITH_ZPAGES + otlp-grpc WITH_OTLP_GRPC ) # opentelemetry-proto is a third party submodule and opentelemetry-cpp release did not pack it. @@ -59,6 +60,8 @@ vcpkg_cmake_configure( -DOPENTELEMETRY_INSTALL=ON -DWITH_ABSEIL=ON ${FEATURE_OPTIONS} + MAYBE_UNUSED_VARIABLES + WITH_OTLP_GRPC ) vcpkg_cmake_install() @@ -67,4 +70,4 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/opentelemetry-cpp/vcpkg.json b/ports/opentelemetry-cpp/vcpkg.json index ba48bb31fa..2f2b365cef 100644 --- a/ports/opentelemetry-cpp/vcpkg.json +++ b/ports/opentelemetry-cpp/vcpkg.json @@ -2,7 +2,7 @@ "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", "name": "opentelemetry-cpp", "version-semver": "1.8.3", - "port-version": 3, + "port-version": 4, "description": [ "OpenTelemetry is a collection of tools, APIs, and SDKs.", "You use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) for analysis in order to understand your software's performance and behavior." @@ -38,13 +38,25 @@ }, "otlp": { "description": "Whether to include the OpenTelemetry Protocol in the SDK", + "dependencies": [ + "protobuf" + ] + }, + "otlp-grpc": { + "description": "Whether to include the OTLP gRPC exporter in the SDK", "dependencies": [ "grpc", { "name": "grpc", "host": true }, - "protobuf" + { + "name": "opentelemetry-cpp", + "default-features": false, + "features": [ + "otlp" + ] + } ] }, "otlp-http": { diff --git a/versions/baseline.json b/versions/baseline.json index 210215fb3c..612829eb77 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5886,7 +5886,7 @@ }, "opentelemetry-cpp": { "baseline": "1.8.3", - "port-version": 3 + "port-version": 4 }, "opentracing": { "baseline": "1.6.0", diff --git a/versions/o-/opentelemetry-cpp.json b/versions/o-/opentelemetry-cpp.json index 40d585392e..c0dc37e8c3 100644 --- a/versions/o-/opentelemetry-cpp.json +++ b/versions/o-/opentelemetry-cpp.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "a2aaa1296022784fb28719885a59fe905dd80e06", + "version-semver": "1.8.3", + "port-version": 4 + }, { "git-tree": "ce4bc10a4f0ebad5cafd14de836017b281cba1f9", "version-semver": "1.8.3",