Skip to content

Commit

Permalink
opentelemetry-cpp 1.11.0
Browse files Browse the repository at this point in the history
- opentelemetry-cpp: unversioned grpc and protobuf
- opentelemetry-cpp: depend on abseil; remove noop WITH_LOGS_PREVIEW=ON
- opentemetry-cpp: define `HAVE_ABSEIL` in test

Co-authored-by: Alexander Bayandin <[email protected]>
Co-authored-by: Ruoyu Zhong <[email protected]>
  • Loading branch information
3 people committed Sep 2, 2023
1 parent 6136ff1 commit c137a81
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Formula/o/opentelemetry-cpp.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
class OpentelemetryCpp < Formula
desc "OpenTelemetry C++ Client"
homepage "https://opentelemetry.io/"
# TODO: Check if we can use unversioned `grpc` and `protobuf` at version bump.
url "https://github.com/open-telemetry/opentelemetry-cpp/archive/refs/tags/v1.10.0.tar.gz"
sha256 "19e8ade04a674c8cf7f0dc6da1f7b0583a27d2cf4dbc03df87894a16a4547834"
url "https://github.com/open-telemetry/opentelemetry-cpp/archive/refs/tags/v1.11.0.tar.gz"
sha256 "f30cd88bf898a5726d245eba882b8e81012021eb00df34109f4dfb203f005cea"
license "Apache-2.0"
head "https://github.com/open-telemetry/opentelemetry-cpp.git", branch: "main"

Expand All @@ -18,11 +17,12 @@ class OpentelemetryCpp < Formula
end

depends_on "cmake" => :build
depends_on "abseil"
depends_on "boost"
depends_on "grpc@1.54"
depends_on "grpc"
depends_on "nlohmann-json"
depends_on "prometheus-cpp"
depends_on "protobuf@21"
depends_on "protobuf"
uses_from_macos "curl"

def install
Expand All @@ -34,10 +34,10 @@ def install
"-DWITH_ELASTICSEARCH=ON",
"-DWITH_EXAMPLES=OFF",
"-DWITH_JAEGER=OFF", # deprecated, needs older `thrift`
"-DWITH_LOGS_PREVIEW=ON",
"-DWITH_METRICS_PREVIEW=ON",
"-DWITH_OTLP_GRPC=ON",
"-DWITH_OTLP_HTTP=ON",
"-DWITH_ABSEIL=ON",
"-DWITH_PROMETHEUS=ON",
*std_cmake_args
system "cmake", "--build", "build"
Expand Down Expand Up @@ -72,10 +72,9 @@ def install
auto scoped_span = trace_api::Scope(tracer->StartSpan("test"));
}
EOS
# Manual `protobuf` include can be removed when we depend on unversioned protobuf.
system ENV.cxx, "test.cc", "-std=c++17",
"-DHAVE_ABSEIL",
"-I#{include}", "-L#{lib}",
"-I#{Formula["protobuf@21"].opt_include}",
"-lopentelemetry_resources",
"-lopentelemetry_exporter_ostream_span",
"-lopentelemetry_trace",
Expand Down

0 comments on commit c137a81

Please sign in to comment.