Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EXPORTER] Change OTLP HTTP content_type default to binary #2480

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
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
4 changes: 2 additions & 2 deletions exporters/otlp/test/otlp_http_exporter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class OtlpHttpExporterTestPeer : public ::testing::Test
void ExportJsonIntegrationTest()
{
auto mock_otlp_client =
OtlpHttpExporterTestPeer::GetMockOtlpHttpClient(HttpRequestContentType::kJson);
OtlpHttpExporterTestPeer::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 @@ -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
Loading