Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Harish S <[email protected]>
  • Loading branch information
perhapsmaple committed Feb 24, 2024
1 parent 8b7a9ea commit 23f03e9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Important changes:
field called compression has been introduced. This field can be set
to "gzip” to enable gzip compression.
* The CMake option `WITH_OTLP_HTTP_COMPRESSION` is introduced to enable
gzip compression support for the OTLP HTTP Exporter and includes a
gzip compression support for the OTLP HTTP Exporter and includes a
dependency on zlib.

## [1.14.1] 2024-02-23
Expand Down
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,10 @@ option(WITH_OTLP_GRPC "Whether to include the OTLP gRPC exporter in the SDK"
option(WITH_OTLP_HTTP "Whether to include the OTLP http exporter in the SDK"
OFF)

option(WITH_OTLP_HTTP_COMPRESSION "Whether to include gzip compression for the OTLP http exporter in the SDK"
OFF)
option(
WITH_OTLP_HTTP_COMPRESSION
"Whether to include gzip compression for the OTLP http exporter in the SDK"
OFF)

option(WITH_ZIPKIN "Whether to include the Zipkin exporter in the SDK" OFF)

Expand Down Expand Up @@ -455,7 +457,9 @@ endif()
# Do we need ZLIB ?
#

if((NOT WITH_API_ONLY) AND WITH_HTTP_CLIENT_CURL AND WITH_OTLP_HTTP_COMPRESSION)
if((NOT WITH_API_ONLY)
AND WITH_HTTP_CLIENT_CURL
AND WITH_OTLP_HTTP_COMPRESSION)
# No specific version required.
find_package(ZLIB REQUIRED)
message(STATUS "Found ZLIB: ${ZLIB_LIBRARIES}, version ${ZLIB_VERSION}")
Expand Down
2 changes: 1 addition & 1 deletion ext/src/http/client/curl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if(WITH_OTLP_HTTP_COMPRESSION)
PRIVATE ZLIB::ZLIB)
else()
target_include_directories(opentelemetry_http_client_curl
INTERFACE "${ZLIB_INCLUDE_DIRS}")
INTERFACE "${ZLIB_INCLUDE_DIRS}")
target_link_libraries(
opentelemetry_http_client_curl
PUBLIC opentelemetry_ext
Expand Down
6 changes: 4 additions & 2 deletions ext/src/http/client/curl/http_client_curl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "opentelemetry/sdk/common/global_log_handler.h"

#ifdef ENABLE_OTLP_COMPRESSION_PREVIEW
#include <zlib.h>
# include <zlib.h>
#endif

#include <list>
Expand Down Expand Up @@ -90,7 +90,9 @@ void Session::SendRequest(
is_session_active_.store(false, std::memory_order_release);
}
#else
OTEL_INTERNAL_LOG_ERROR("[HTTP Client Curl] Set WITH_OTLP_HTTP_COMPRESSION=ON to use gzip compression with the OTLP HTTP Exporter");
OTEL_INTERNAL_LOG_ERROR(
"[HTTP Client Curl] Set WITH_OTLP_HTTP_COMPRESSION=ON to use gzip compression with the "
"OTLP HTTP Exporter");
#endif
}

Expand Down

0 comments on commit 23f03e9

Please sign in to comment.