Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ Increment the:
* Enable WITH_OTLP_RETRY_PREVIEW by default
[#3953](https://github.com/open-telemetry/opentelemetry-cpp/pull/3953)

* Enable WITH_OTLP_GRPC_SSL_MTLS_PREVIEW by default
[#3970](https://github.com/open-telemetry/opentelemetry-cpp/pull/3970)

Important changes:

* Enable WITH_OTLP_RETRY_PREVIEW by default
Expand All @@ -48,6 +51,15 @@ Important changes:
* CMake flag WITH_OTLP_RETRY_PREVIEW is now enabled by default.
* This flag is deprecated, planned for removal.

* Enable WITH_OTLP_GRPC_SSL_MTLS_PREVIEW by default
[#3970](https://github.com/open-telemetry/opentelemetry-cpp/pull/3970)

* CMake flag WITH_OTLP_GRPC_SSL_MTLS_PREVIEW is now enabled by default.
* This flag is deprecated, planned for removal.
* Bazel now always builds with ENABLE_OTLP_GRPC_SSL_MTLS_PREVIEW.
* grpc properties for ssl KEY and CERT are always available,
adjust the application code to initialize all members in grpc options.

## [1.26.0] 2026-03-19

* [RELEASE] Bump main branch to 1.26.0-dev
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ endif()
option(WITH_OTLP_RETRY_PREVIEW "Whether to enable retry functionality" ON)

option(WITH_OTLP_GRPC_SSL_MTLS_PREVIEW
"Whether to enable mTLS support for gRPC" OFF)
"Whether to enable mTLS support for gRPC" ON)

option(WITH_OTLP_GRPC_CREDENTIAL_PREVIEW
"Whether to enable gRPC credentials option in OTLP gRPC Exporter" OFF)
Expand Down
52 changes: 52 additions & 0 deletions DEPRECATED.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,58 @@ to enable or disable the retry feature.

This compilation flag will be removed after October 1st, 2026.

### CMake WITH_OTLP_GRPC_SSL_MTLS_PREVIEW

#### Announcement (WITH_OTLP_GRPC_SSL_MTLS_PREVIEW)

The CMake compile flag WITH_OTLP_GRPC_SSL_MTLS_PREVIEW is deprecated by:

* Enable WITH_OTLP_GRPC_SSL_MTLS_PREVIEW by default
[#3970](https://github.com/open-telemetry/opentelemetry-cpp/pull/3970)

#### Motivation (WITH_OTLP_GRPC_SSL_MTLS_PREVIEW)

Flags like `WITH_OTLP_GRPC_SSL_MTLS_PREVIEW` are used to conditionally compile
new features, when they are introduced in the code base.

Now that this feature is stable, conditional compilation is no longer
necessary.

#### Scope (WITH_OTLP_GRPC_SSL_MTLS_PREVIEW)

Remove compilation flag WITH_OTLP_GRPC_SSL_MTLS_PREVIEW in CMake.

Remove ifdef ENABLE_OTLP_GRPC_SSL_MTLS_PREVIEW in C++ .

#### Mitigation (WITH_OTLP_GRPC_SSL_MTLS_PREVIEW)

Applications built with `WITH_OTLP_GRPC_SSL_MTLS_PREVIEW=ON` need to:

* remove the WITH_OTLP_GRPC_SSL_MTLS_PREVIEW flag from CMake scripts

Applications built with `WITH_OTLP_GRPC_SSL_MTLS_PREVIEW=OFF` need to:

* remove the WITH_OTLP_GRPC_SSL_MTLS_PREVIEW flag from CMake scripts
* initialize ssl client properties in the OTLP GRPC exporter options,
either with real KEY and CERT data, or with empty strings.

See:

* struct `OtlpGrpcClientOptions`
* struct `OtlpGrpcLogRecordExporterOptions`
* struct `OtlpGrpcMetricExporterOptions`
* struct `OtlpGrpcExporterOptions`

For Bazel, no compilation flag exists, the code is always built using
ENABLE_OTLP_GRPC_SSL_MTLS_PREVIEW.

Make sure to properly initialize ssl client properties
to enable or disable the feature.

#### Planned removal (WITH_OTLP_GRPC_SSL_MTLS_PREVIEW)

This compilation flag will be removed after October 1st, 2026.

## [opentelemetry-cpp API]

### Deprecation of EventLogger
Expand Down
2 changes: 2 additions & 0 deletions api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ endif()
if(WITH_OTLP_GRPC_SSL_MTLS_PREVIEW)
target_compile_definitions(opentelemetry_api
INTERFACE ENABLE_OTLP_GRPC_SSL_MTLS_PREVIEW)
else()
message(WARNING "WITH_OTLP_GRPC_SSL_MTLS_PREVIEW=OFF is deprecated")
endif()

if(WITH_OTLP_GRPC_CREDENTIAL_PREVIEW)
Expand Down
7 changes: 6 additions & 1 deletion exporters/otlp/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ cc_library(
defines = select({
":enable_otlp_grpc_credential_preview": ["ENABLE_OTLP_GRPC_CREDENTIAL_PREVIEW"],
"//conditions:default": [],
}),
}) + ["ENABLE_OTLP_GRPC_SSL_MTLS_PREVIEW"],
strip_include_prefix = "include",
tags = [
"otlp",
Expand Down Expand Up @@ -122,6 +122,7 @@ cc_library(
"include/opentelemetry/exporters/otlp/protobuf_include_prefix.h",
"include/opentelemetry/exporters/otlp/protobuf_include_suffix.h",
],
defines = ["ENABLE_OTLP_GRPC_SSL_MTLS_PREVIEW"],
strip_include_prefix = "include",
tags = [
"otlp",
Expand All @@ -146,6 +147,7 @@ cc_library(
hdrs = [
"include/opentelemetry/exporters/otlp/otlp_grpc_span_builder.h",
],
defines = ["ENABLE_OTLP_GRPC_SSL_MTLS_PREVIEW"],
strip_include_prefix = "include",
tags = [
"otlp",
Expand Down Expand Up @@ -336,6 +338,7 @@ cc_library(
"include/opentelemetry/exporters/otlp/protobuf_include_prefix.h",
"include/opentelemetry/exporters/otlp/protobuf_include_suffix.h",
],
defines = ["ENABLE_OTLP_GRPC_SSL_MTLS_PREVIEW"],
strip_include_prefix = "include",
tags = [
"otlp",
Expand All @@ -360,6 +363,7 @@ cc_library(
hdrs = [
"include/opentelemetry/exporters/otlp/otlp_grpc_push_metric_builder.h",
],
defines = ["ENABLE_OTLP_GRPC_SSL_MTLS_PREVIEW"],
strip_include_prefix = "include",
tags = [
"otlp",
Expand Down Expand Up @@ -602,6 +606,7 @@ cc_library(
hdrs = [
"include/opentelemetry/exporters/otlp/otlp_grpc_log_record_builder.h",
],
defines = ["ENABLE_OTLP_GRPC_SSL_MTLS_PREVIEW"],
strip_include_prefix = "include",
tags = [
"otlp",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ struct OtlpGrpcClientOptions
/** CA CERT, as a string. */
std::string ssl_credentials_cacert_as_string;

#ifdef ENABLE_OTLP_GRPC_SSL_MTLS_PREVIEW
/** CLIENT KEY, path to a file. */
std::string ssl_client_key_path;

Expand All @@ -54,7 +53,6 @@ struct OtlpGrpcClientOptions

/** CLIENT CERT, as a string. */
std::string ssl_client_cert_string;
#endif

#ifdef ENABLE_OTLP_GRPC_CREDENTIAL_PREVIEW
/** Use custom ChannelCredentials, instead of the SSL options above. */
Expand Down
Loading