Skip to content

Commit 7e969ee

Browse files
committed
Resolved some more warnings and missed try while git rebasing.
1 parent aebd3c6 commit 7e969ee

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

exporters/ostream/test/ostream_log_test.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ TEST(OStreamLogRecordExporter, SimpleLogToCout)
192192
" trace_flags : 00\n",
193193
" scope : \n",
194194
" name : otel-cpp\n",
195-
" version : " OPENTELEMETRY_SDK_VERSION "\n",
195+
" version : ", OPENTELEMETRY_SDK_VERSION, "\n",
196196
" schema_url : https://opentelemetry.io/schemas/1.15.0\n",
197197
" attributes : \n",
198198
" scope.attr.key: scope.attr.value\n",
@@ -344,7 +344,7 @@ TEST(OStreamLogRecordExporter, LogWithVariantTypesToClog)
344344
" res1: [1,2,3]\n",
345345
" attributes : \n",
346346
" attr1: [0,1,0]\n",
347-
" event_id : 0\n"
347+
" event_id : 0\n",
348348
" event_name : \n",
349349
" trace_id : 00000000000000000000000000000000\n",
350350
" span_id : 0000000000000000\n",
@@ -418,7 +418,7 @@ TEST(OStreamLogRecordExporter, IntegrationTest)
418418
" telemetry.sdk.name: opentelemetry\n",
419419
" telemetry.sdk.language: cpp\n",
420420
" attributes : \n",
421-
" event_id : 0\n"
421+
" event_id : 0\n",
422422
" event_name : \n",
423423
" trace_id : 00000000000000000000000000000000\n",
424424
" span_id : 0000000000000000\n",
@@ -491,14 +491,14 @@ TEST(OStreamLogRecordExporter, IntegrationTestWithEventId)
491491
" telemetry.sdk.name: opentelemetry\n",
492492
" telemetry.sdk.language: cpp\n",
493493
" attributes : \n",
494-
" event_id : 12345678\n"
494+
" event_id : 12345678\n",
495495
" event_name : test_event_id\n",
496496
" trace_id : 00000000000000000000000000000000\n",
497497
" span_id : 0000000000000000\n",
498498
" trace_flags : 00\n",
499499
" scope : \n",
500500
" name : opentelelemtry_library\n",
501-
" version : " OPENTELEMETRY_SDK_VERSION "\n",
501+
" version : ", OPENTELEMETRY_SDK_VERSION, "\n",
502502
" schema_url : https://opentelemetry.io/schemas/1.11.0\n",
503503
" attributes : \n",
504504
" scope.attr.key: 123\n",

exporters/otlp/src/otlp_http_client.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@ static void ConvertListFieldToJson(nlohmann::json &value,
434434
const google::protobuf::FieldDescriptor *field_descriptor,
435435
const OtlpHttpClientOptions &options);
436436

437+
// NOLINTBEGIN(misc-no-recursion)
437438
static void ConvertGenericMessageToJson(nlohmann::json &value,
438439
const google::protobuf::Message &message,
439440
const OtlpHttpClientOptions &options)
@@ -468,7 +469,6 @@ bool SerializeToHttpBody(http_client::Body &output, const google::protobuf::Mess
468469
return true;
469470
}
470471

471-
// NOLINTBEGIN(misc-no-recursion)
472472
void ConvertGenericFieldToJson(nlohmann::json &value,
473473
const google::protobuf::Message &message,
474474
const google::protobuf::FieldDescriptor *field_descriptor,
@@ -655,8 +655,7 @@ void ConvertListFieldToJson(nlohmann::json &value,
655655
}
656656
}
657657

658-
// NOLINTEND(misc-no-recursion) suppressing for performance as if implemented with stack needs
659-
// Dynamic memory allocation
658+
// NOLINTEND(misc-no-recursion) suppressing for performance, if implemented iterative process needs DMA
660659

661660
} // namespace
662661

sdk/src/resource/resource_detector.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const char *OTEL_SERVICE_NAME = "OTEL_SERVICE_NAME";
2424

2525
Resource OTELResourceDetector::Detect() noexcept
2626
{
27+
try{
2728
std::string attributes_str, service_name;
2829

2930
bool attributes_exists = opentelemetry::sdk::common::GetStringEnvironmentVariable(

0 commit comments

Comments
 (0)