Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
This is a new PR with correct identity.
  • Loading branch information
kirby-mimic committed Jan 10, 2024
1 parent c4f39f2 commit 6de99b2
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Breaking changes:
* CMake options `WITH_OTLP_HTTP_SSL_PREVIEW`
and `WITH_OTLP_HTTP_SSL_TLS_PREVIEW` are removed.
Building opentelemetry-cpp without SSL support is no longer possible.
* [#2480] Change default OTLP Http Exporter content type from kJson to kBInary
See The default is http/protobuf, which means binary, [HERE](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#specify-protocol

## [1.13.0] 2023-12-06

Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/src/otlp_http_exporter_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace otlp
OtlpHttpExporterOptions::OtlpHttpExporterOptions()
{
url = GetOtlpDefaultHttpTracesEndpoint();
content_type = HttpRequestContentType::kJson;
content_type = HttpRequestContentType::kBinary;
json_bytes_mapping = JsonBytesMappingKind::kHexId;
use_json_name = false;
console_debug = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace otlp
OtlpHttpLogRecordExporterOptions::OtlpHttpLogRecordExporterOptions()
{
url = GetOtlpDefaultHttpLogsEndpoint();
content_type = HttpRequestContentType::kJson;
content_type = HttpRequestContentType::kBinary;
json_bytes_mapping = JsonBytesMappingKind::kHexId;
use_json_name = false;
console_debug = false;
Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/src/otlp_http_metric_exporter_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace otlp
OtlpHttpMetricExporterOptions::OtlpHttpMetricExporterOptions()
{
url = GetOtlpDefaultMetricsEndpoint();
content_type = HttpRequestContentType::kJson;
content_type = HttpRequestContentType::kBinary;
json_bytes_mapping = JsonBytesMappingKind::kHexId;
use_json_name = false;
console_debug = false;
Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/test/otlp_http_exporter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ class OtlpHttpExporterTestPeer : public ::testing::Test
void ExportJsonIntegrationTestAsync()
{
auto mock_otlp_client =
OtlpHttpExporterTestPeer::GetMockOtlpHttpClient(HttpRequestContentType::kJson, true);
OtlpHttpExporterTestPeer::GetMockOtlpHttpClient(HttpRequestContentType::kBinary, true);
auto mock_otlp_http_client = mock_otlp_client.first;
auto client = mock_otlp_client.second;
auto exporter = GetExporter(std::unique_ptr<OtlpHttpClient>{mock_otlp_http_client});
Expand Down
4 changes: 2 additions & 2 deletions exporters/otlp/test/otlp_http_log_record_exporter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class OtlpHttpLogRecordExporterTestPeer : public ::testing::Test
void ExportJsonIntegrationTest()
{
auto mock_otlp_client =
OtlpHttpLogRecordExporterTestPeer::GetMockOtlpHttpClient(HttpRequestContentType::kJson);
OtlpHttpLogRecordExporterTestPeer::GetMockOtlpHttpClient(HttpRequestContentType::kBinary);
auto mock_otlp_http_client = mock_otlp_client.first;
auto client = mock_otlp_client.second;
auto exporter = GetExporter(std::unique_ptr<OtlpHttpClient>{mock_otlp_http_client});
Expand Down Expand Up @@ -221,7 +221,7 @@ class OtlpHttpLogRecordExporterTestPeer : public ::testing::Test
void ExportJsonIntegrationTestAsync()
{
auto mock_otlp_client = OtlpHttpLogRecordExporterTestPeer::GetMockOtlpHttpClient(
HttpRequestContentType::kJson, true);
HttpRequestContentType::kBinary, true);
auto mock_otlp_http_client = mock_otlp_client.first;
auto client = mock_otlp_client.second;
auto exporter = GetExporter(std::unique_ptr<OtlpHttpClient>{mock_otlp_http_client});
Expand Down
6 changes: 3 additions & 3 deletions exporters/otlp/test/otlp_http_metric_exporter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class OtlpHttpMetricExporterTestPeer : public ::testing::Test
)
{
auto mock_otlp_client =
OtlpHttpMetricExporterTestPeer::GetMockOtlpHttpClient(HttpRequestContentType::kJson
OtlpHttpMetricExporterTestPeer::GetMockOtlpHttpClient(HttpRequestContentType::kBinary
#ifdef ENABLE_ASYNC_EXPORT
,
async_mode
Expand Down Expand Up @@ -293,7 +293,7 @@ class OtlpHttpMetricExporterTestPeer : public ::testing::Test
)
{
auto mock_otlp_client =
OtlpHttpMetricExporterTestPeer::GetMockOtlpHttpClient(HttpRequestContentType::kJson
OtlpHttpMetricExporterTestPeer::GetMockOtlpHttpClient(HttpRequestContentType::kBinary
#ifdef ENABLE_ASYNC_EXPORT
,
async_mode
Expand Down Expand Up @@ -483,7 +483,7 @@ class OtlpHttpMetricExporterTestPeer : public ::testing::Test
)
{
auto mock_otlp_client =
OtlpHttpMetricExporterTestPeer::GetMockOtlpHttpClient(HttpRequestContentType::kJson
OtlpHttpMetricExporterTestPeer::GetMockOtlpHttpClient(HttpRequestContentType::kBinary
#ifdef ENABLE_ASYNC_EXPORT
,
async_mode
Expand Down

0 comments on commit 6de99b2

Please sign in to comment.