Skip to content

deps: update opentelemetry-cpp to 1.27.0 - #422

Merged
santigimeno merged 3 commits into
node-v24.x-nsolid-v6.xfrom
santi/upgrade_otel_cpp
May 25, 2026
Merged

deps: update opentelemetry-cpp to 1.27.0#422
santigimeno merged 3 commits into
node-v24.x-nsolid-v6.xfrom
santi/upgrade_otel_cpp

Conversation

@santigimeno

@santigimeno santigimeno commented Feb 9, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Upgraded OpenTelemetry C++ to 1.25.0 with C++17 requirement and schema 1.39.0.
    • Added multi-instrument metrics callbacks (ABI v2), new semantic conventions (GenAI, JSON-RPC, K8s, NFS, MCP, OpenShift), and container/system metrics.
    • Introduced OTLP/Prometheus/OStream builder libraries and structured TLS options for exporters.
    • Added collection/cardinality limits and exemplar filter configuration.
  • Bug Fixes

    • ETW logs include active trace context and non-epoch timestamps.
    • Fixed histogram downscale edge cases, decoding/overflow issues, and stability in providers.
  • Changes

    • Removed Zipkin builder/configuration support.

@santigimeno
santigimeno requested a review from RafaelGSS February 9, 2026 11:39
@santigimeno santigimeno self-assigned this Feb 9, 2026
@coderabbitai

coderabbitai Bot commented Feb 9, 2026

Copy link
Copy Markdown

Walkthrough

Bazel/CMake config updates, version bumps, and C++17 adoption. Extensive API/SDK changes: new metrics multi-observer callback API, TLS-configurable OTLP builders, Prometheus/ostream/OTLP builder libraries, configuration subsystem (YAML parser, types, env-driven options), ETW exporter tracing/timestamp tweaks, numerous semconv additions/updates, Zipkin builder removal, tests updated accordingly.

Changes

Cohort / File(s) Summary
Tooling and Standards
deps/opentelemetry-cpp/.bazelrc, .bazelversion, .clang-tidy, .gitignore, .devcontainer/Dockerfile.dev, ext/src/http/client/curl/BUILD
C++17 enabled; Bazel 8.5.0; clang-tidy rules adjusted; ignore CodeQL dirs; LLVM 20 toolchain in devcontainer; curl target set linkstatic.
BCR and CI Metadata
deps/opentelemetry-cpp/.bcr/*, .clomonitor.yml, .markdownlint.json
Added BCR templates, presubmit matrix (C++17), publishing docs; clomonitor exemption; markdownlint rule.
Versioning
MODULE.bazel, api/include/.../version.h, sdk/include/.../version/version.h, sdk/src/version/version.cc, semconv/schema_url.h
Bumped module to 1.25.0; API/SDK versions to 1.25.0; schema URL 1.39.0; build date updated.
SemConv Additions/Edits
api/include/opentelemetry/semconv/**/*
Many new incubating attributes (cloud, k8s, gen_ai, mcp, nfs, openshift, jsonrpc, pprof, process/system updates), deprecations, docs/link updates.
API: Metrics Multi-Observer
api/include/opentelemetry/metrics/meter.h, api/include/opentelemetry/metrics/multi_observer_result.h, api/include/opentelemetry/metrics/noop.h
Introduces MultiObserverResult, ABI v2 Meter::RegisterCallback/DeregisterCallback, noop stubs.
API: Context/Tracing/Nostd
context/runtime_context.h, trace/{span_id.h,trace_id.h,trace_flags.h}, nostd/*
Token dtor virtual; stack capacity guards; size types aligned to size_t; minor nostd fixes (self-assign guards, casts); docs URL tweaks.
API: Logs ABI warning guards
logs/{event_logger*.h,noop.h,provider.h}
Pragma guards for deprecation warnings; explicit destructors for noops; declaration reordering within ABI guards.
API: Baggage URL decode
baggage/baggage.h
Broadened allowed unencoded character set; tests added.
Windows Header Casing
api/include/.../dynamic_load_windows.h, exporters/etw/include/.../*, exporters/otlp/src/otlp_file_client.cc, sdk/src/common/fast_random_number_generator.h (comment)
Normalize to <windows.h> and related lower-case includes.
Exporters: ETW
exporters/etw/include/.../{etw_logger.h,etw_provider.h,etw_tracer.h,TraceLoggingDynamic.h,utils.h,uuid.h}, exporters/etw/test/*
Propagate active span context to logs; timestamp fallback; provider close guard; tracer IsClosed accessor; parameter rename keyword(s); added tests.
Exporters: OStream Builders
exporters/ostream/{BUILD,CMakeLists.txt,src/console_*_builder.cc}
Added builder libraries for span/metrics/logs; metric builder handles temporality preference.
Exporters: OTLP Builders + TLS
exporters/otlp/{BUILD,CMakeLists.txt,include/...*,src/*}, exporters/otlp/benchmark/*
Introduced builder_utils, multiple builder libs (gRPC/HTTP/File for spans/logs/metrics); new TLS config types; GrpcUseSsl helper; recordable collection limits; conditional protobuf includes; benchmark added.
Exporters: Prometheus Builder
exporters/prometheus/{BUILD,CMakeLists.txt,src/prometheus_pull_builder.cc,src/exporter_options.cc}
Added builder lib; new translation strategy, target info handling; env-init fixes.
Exporters: Zipkin Removal
exporters/zipkin/{CMakeLists.txt,BUILD,include/.../zipkin_builder.h,src/zipkin_builder.cc}, sdk/include/.../{registry.h,span_exporter_configuration_visitor.h}, sdk/include/.../zipkin_*
Removed Zipkin builder and configuration from public API and registry; kept pkg-config for exporter.
Configuration Subsystem (New)
sdk/{include/src}/configuration/**/*, sdk/src/CMakeLists.txt, sdk/test/configuration/*, sdk/CMakeLists.txt
Added YAML-backed configuration library (parser, document nodes with locations, TLS configs, distribution, cardinality limits, severity number, exemplar filter, translation strategy); parser APIs expanded; tests added.
SDK: Metrics Core
sdk/include/sdk/metrics/**/*, sdk/src/metrics/**/*
Added MultiObserverResult impl; ObservableRegistry now returns/removes callbacks by handle and supports multi-instrument; Meter wires Register/Deregister; view validation; aggregation config type introspection; typo fix GetAllEntries; histogram merge condition adjusted.
SDK: Trace/Logs Options from Env
sdk/include/sdk/trace/batch_span_processor_options.h, sdk/src/trace/batch_span_processor_options.cc, sdk/include/sdk/logs/batch_log_record_processor_options.h, sdk/src/logs/batch_log_record_processor_options.cc, related CMake lists
Batch processor options now environment-driven defaults for trace/logs; integrated into builds.
SDK: Misc Fixes
sdk/src/common/*, sdk/src/trace/*, sdk/include/sdk/common/attribute_utils.h, `sdk/include/sdk/metrics/export/periodic_exporting_metric_reader*.h
cc`
Tests and BUILD rule loads
api/test/**/*, sdk/test/**/*, ext/test/**/*, exporters/*/test/*
Numerous tests added/updated for new behaviors (TLS, retries, limits, multi-observer, config); Bazel loads for rules_cc across BUILD files.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor App as Application
  participant Meter as Meter (SDK)
  participant Reg as ObservableRegistry
  participant MR as MultiObserverResult
  participant Inst as ObservableInstrument(s)
  participant Reader as MetricReader

  rect rgba(200, 230, 255, 0.5)
  App->>Meter: RegisterCallback(cb, state, [Inst...])
  Meter->>Reg: AddCallback(cb, state, [Inst...])
  Reg->>MR: Register instruments
  Reg-->>App: callback_id
  end

  rect rgba(200, 255, 200, 0.5)
  Reader->>Meter: Collect()
  Meter->>Reg: Observe()
  Reg->>cb: Invoke with MR
  cb->>MR: ForInstrument<T>().Observe(...)
  Reg->>MR: StoreResults(collection_ts)
  MR->>Inst: Write to storage
  Reg-->>Meter: Done
  Meter-->>Reader: Export metrics
  end

  rect rgba(255, 220, 200, 0.5)
  App->>Meter: DeregisterCallback(callback_id)
  Meter->>Reg: RemoveCallback(callback_id)
  Reg-->>App: Ack
  end
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~150 minutes

Suggested reviewers

  • RafaelGSS

Poem

Thump-thump! I tap my build with glee,
New metrics bloom like clover tea. 🌱
TLS burrows, safe and snug,
ETW trails a tracing hug.
Zipkin hopped—now out of sight,
OTL P-builders shine so bright.
I ship, I sip—release feels right! 🐇✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch santi/upgrade_otel_cpp

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 13

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
deps/opentelemetry-cpp/exporters/otlp/test/otlp_http_exporter_test.cc (1)

173-227: ⚠️ Potential issue | 🟠 Major

Finish the HTTP callback on guard exits.

Line 180–199 returns early without finishing the callback, which can leave the request hanging and make ForceFlush() flaky or block retries. Ensure the callback is always completed, even for guard failures.

💡 Suggested fix (apply the same pattern to similar lambdas)
-              if (check_json["resourceSpans"].size() == 0)
-              {
-                return;
-              }
+              auto finish = [&]() {
+                http_client::nosend::Response response;
+                response.Finish(*callback.get());
+              };
+              if (check_json["resourceSpans"].size() == 0)
+              {
+                finish();
+                return;
+              }
...
-              if (received_trace_id != report_trace_id)
-              {
-                return;
-              }
+              if (received_trace_id != report_trace_id)
+              {
+                finish();
+                return;
+              }
...
-              http_client::nosend::Response response;
-              response.Finish(*callback.get());
+              finish();
deps/opentelemetry-cpp/exporters/otlp/test/otlp_http_log_record_exporter_test.cc (1)

161-244: ⚠️ Potential issue | 🟠 Major

Finish the HTTP callback on guard exits.

Line 168–181 returns early without finishing the callback, which can leave the request hanging and make ForceFlush() flaky or block retries. Ensure the callback is always completed, even for guard failures.

💡 Suggested fix (apply the same pattern to similar lambdas)
-              if (check_json["resourceLogs"].size() == 0)
-              {
-                return;
-              }
+              auto finish = [&]() {
+                http_client::nosend::Response response;
+                response.Finish(*callback.get());
+              };
+              if (check_json["resourceLogs"].size() == 0)
+              {
+                finish();
+                return;
+              }
...
-              if (received_trace_id == report_trace_id && received_span_id == report_span_id)
-              {
-                ++received_record_counter;
-              }
+              if (received_trace_id == report_trace_id && received_span_id == report_span_id)
+              {
+                ++received_record_counter;
+              }
...
-              http_client::nosend::Response response;
-              response.Finish(*callback.get());
+              finish();
deps/opentelemetry-cpp/exporters/etw/include/opentelemetry/exporters/etw/etw_tracer.h (1)

165-422: ⚠️ Potential issue | 🟠 Major

Validate provider handle before marking tracer as open.

The constructor unconditionally sets isClosed_ to false after etwProvider().open(provId, encoding) without checking whether the handle is valid. Since open() can fail silently and return a Handle with providerHandle == INVALID_HANDLE (see etw_provider.h lines 188–190 and 154, 172), IsClosed() will misreport the tracer's state. The destructor will subsequently attempt to close an invalid handle. Check provHandle.providerHandle != INVALID_HANDLE before setting isClosed_ = false, or handle registration failure appropriately in the constructor.

deps/opentelemetry-cpp/api/include/opentelemetry/context/runtime_context.h (1)

244-343: ⚠️ Potential issue | 🟠 Major

Fix out-of-bounds read in Contains() when size_ exceeds max_capacity_

When size_ grows beyond capacity_ (which happens when size_ > max_capacity_), the Contains() method iterates from size_ down to 1 and accesses base_[pos - 1], reading past the allocated buffer. This occurs in Detach() when it calls Contains() in deep-nesting scenarios. Clamp the search range to the actual allocated capacity:

Proposed fix
 bool Contains(const Token &token) const noexcept
 {
-  for (size_t pos = size_; pos > 0; --pos)
+  const size_t search_size = (std::min)(size_, capacity_);
+  for (size_t pos = search_size; pos > 0; --pos)
   {
     if (token == base_[pos - 1])
     {
       return true;
     }
   }
 
   return false;
 }
🤖 Fix all issues with AI agents
In `@deps/opentelemetry-cpp/.bcr/presubmit.yml`:
- Around line 10-14: The CI presubmit uses a single verify_targets task that
sets build_flags['--cxxopt=-std=c++17'] for all platforms which breaks Windows
MSVC; split into two platform-specific verify tasks (e.g., verify_targets_unix
and verify_targets_windows) so the Unix-like matrix entries (debian10, macos,
ubuntu2004) keep build_flags with --cxxopt=-std=c++17 while the Windows entry
uses --cxxopt=/std:c++17; ensure each task still includes the same build_targets
(e.g., '@opentelemetry-cpp//api') and the matrix/when conditions select the
correct platforms.

In `@deps/opentelemetry-cpp/.devcontainer/Dockerfile.dev`:
- Around line 25-28: Replace the interactive update-alternatives calls with
non-interactive --set invocations: instead of running "update-alternatives
--config clang-tidy" and "update-alternatives --config llvm-config", use
"update-alternatives --set clang-tidy /usr/bin/clang-tidy-20" and
"update-alternatives --set llvm-config /usr/bin/llvm-config-20" so the Docker
build does not require a TTY; update the RUN line that currently calls
update-alternatives for clang-tidy and llvm-config accordingly.

In
`@deps/opentelemetry-cpp/api/include/opentelemetry/semconv/incubating/gcp_attributes.h`:
- Around line 101-107: The documentation comment above the constant
kGcpApphubDestinationServiceCriticalityType uses “destination workload” but the
constant is for destination service criticality; update the semconv
source/template to replace “destination workload” with “destination service” in
the docstring for kGcpApphubDestinationServiceCriticalityType (and any matching
incubating template entries), then regenerate the generated header so the
updated comment is emitted alongside that constant.

In
`@deps/opentelemetry-cpp/api/include/opentelemetry/semconv/incubating/system_metrics.h`:
- Around line 605-695: The deprecated metrics for
kMetricSystemLinuxMemoryAvailable and kMetricSystemLinuxMemorySlabUsage use
packet semantics and Counter types incorrectly; update
descrMetricSystemLinuxMemoryAvailable and descrMetricSystemLinuxMemorySlabUsage
to memory-appropriate text (e.g., "An estimate of how much memory is
available..." and "Reports the memory used by the slab allocator..."), change
unitMetricSystemLinuxMemoryAvailable and unitMetricSystemLinuxMemorySlabUsage to
"By", replace synchronous Counter types and factory calls in
CreateSyncInt64MetricSystemLinuxMemoryAvailable/CreateSyncDoubleMetricSystemLinuxMemoryAvailable
and
CreateSyncInt64MetricSystemLinuxMemorySlabUsage/CreateSyncDoubleMetricSystemLinuxMemorySlabUsage
to UpDownCounter versions (CreateInt64UpDownCounter/CreateDoubleUpDownCounter
and corresponding unique_ptr<metrics::UpDownCounter<...>> types), and replace
asynchronous ObservableCounter usage in
CreateAsyncInt64MetricSystemLinuxMemoryAvailable/CreateAsyncDoubleMetricSystemLinuxMemoryAvailable
and
CreateAsyncInt64MetricSystemLinuxMemorySlabUsage/CreateAsyncDoubleMetricSystemLinuxMemorySlabUsage
with ObservableUpDownCounter and
CreateInt64ObservableUpDownCounter/CreateDoubleObservableUpDownCounter to match
the non-deprecated memory semantics.

In
`@deps/opentelemetry-cpp/exporters/otlp/test/otlp_http_metric_exporter_test.cc`:
- Around line 287-293: The early-return branch that checks
request_body.resource_metrics_size()/scope_metrics_size()/metrics_size() exits
without completing the RPC; modify that branch to call response.Finish(...)
before returning (e.g., response.Finish(grpc::Status::OK) or the appropriate
Finish signature used elsewhere in this test) so the call's callback is always
invoked; update the block containing request_body and received_record_counter to
call response.Finish(...) then return.
- Around line 186-200: The early-return branches in the test (after checking
check_json["resourceMetrics"], resource_metrics["scopeMetrics"], and
scope_metrics["metrics"]) skip calling response.Finish(*callback.get()), which
can leave the HTTP client callback unresolved; update each early-return path in
otlp_http_metric_exporter_test.cc to call response.Finish(*callback.get())
before returning (or otherwise ensure the callback is completed), referencing
the existing response and callback objects used in the test so the HTTP client
is always signaled even when the JSON guards cause an early exit.

In
`@deps/opentelemetry-cpp/sdk/include/opentelemetry/sdk/configuration/configuration_parser.h`:
- Around line 374-377: Remove the unused member variable version_ from the
ConfigurationParser class declaration in configuration_parser.h: the file
currently declares version_, version_major_, and version_minor_, but only
version_major_ and version_minor_ are used/initialized; delete the unused
std::string version_ member to avoid dead code and keep the class consistent
with its implementation.

In
`@deps/opentelemetry-cpp/sdk/include/opentelemetry/sdk/configuration/configuration.h`:
- Line 70: Remove the erroneous use of the C-style `enum` keyword when declaring
the scoped enum variable: update the declaration of `log_level` to use the
scoped enum type `SeverityNumber` directly (replace `enum SeverityNumber
log_level = SeverityNumber::info;` with a declaration that omits `enum`) so the
variable `log_level` is correctly typed as `SeverityNumber` and initialized to
`SeverityNumber::info`.

In
`@deps/opentelemetry-cpp/sdk/include/opentelemetry/sdk/configuration/configured_sdk.h`:
- Around line 51-52: The member log_level in class ConfiguredSdk is left
uninitialized causing undefined behavior when Install() calls SetLogLevel();
modify the ConfiguredSdk() constructor to value-initialize log_level to
opentelemetry::sdk::common::internal_log::LogLevel::None so log_level has a
well-defined default before Install() reads it (leave resource initialization
as-is).

In `@deps/opentelemetry-cpp/sdk/src/CMakeLists.txt`:
- Around line 11-13: The CMake conditional USING the WITH_CONFIGURATION symbol
is never defined so the configuration subdirectory never builds; add an option
definition for WITH_CONFIGURATION in the parent CMakeLists so the flag can be
toggled (e.g., define a CMake option named WITH_CONFIGURATION with a sensible
default such as ON) and ensure that the three places that check
IF(WITH_CONFIGURATION) now respect that option; update the top-level or sdk
CMakeLists to declare the option before those IF(...) checks so
add_subdirectory(configuration) can be enabled when desired.

In `@deps/opentelemetry-cpp/sdk/src/configuration/CMakeLists.txt`:
- Around line 30-34: The pkg-config entry for the "configuration" component uses
the wrong description string; update the opentelemetry_add_pkgconfig call for
the component named "configuration" so the second description argument refers to
configuration (e.g., "Configuration components for the OpenTelemetry SDK" or
similar) rather than "Components for exporting traces in the OpenTelemetry SDK."

In `@deps/opentelemetry-cpp/sdk/src/trace/batch_span_processor_options.cc`:
- Around line 30-38: Both GetMaxQueueSizeFromEnv() and
GetMaxExportBatchSizeFromEnv() must guard against environment-parsed zero
values: after calling
opentelemetry::sdk::common::GetUintEnvironmentVariable(...) and before returning
the parsed value, check if the parsed uint value is zero and if so return
kDefaultMaxQueueSize (for GetMaxQueueSizeFromEnv) or kDefaultMaxExportBatchSize
(for GetMaxExportBatchSizeFromEnv); keep the existing fallback when
GetUintEnvironmentVariable fails, and otherwise return
static_cast<size_t>(value) only when value != 0.
🧹 Nitpick comments (11)
deps/opentelemetry-cpp/exporters/ostream/src/console_push_metric_builder.cc (1)

54-54: Nitpick: Trailing semicolon after switch block.

Line 54 has a semicolon after the closing brace of the switch statement. While this is syntactically valid (empty statement), it's typically unnecessary. Since this is vendored upstream code, this is a very minor observation.

deps/opentelemetry-cpp/ext/test/http/curl_http_test.cc (1)

501-537: Make the TODO traceable to avoid it becoming permanent.

Consider linking the TODO to the same issue referenced above so it’s easy to track re-enablement.

🔧 Proposed tweak
-      // TODO: Spurious test failures here.
+      // TODO(`#3535`): Spurious test failures here.
deps/opentelemetry-cpp/sdk/test/metrics/view_registry_test.cc (1)

96-138: Strengthen null-parameter tests to assert the view wasn’t registered.

Right now these tests only check “no crash”; consider also asserting FindViews returns the default view (or that the “test_view” name is never observed) to prove the call was ignored.

deps/opentelemetry-cpp/.bcr/README.md (1)

14-16: Minor inconsistency in Bazel version notation.

The presubmit.yml file uses 9.x but this README says 9.*. Consider aligning the notation for consistency.

📝 Suggested fix
 Defines the BCR presubmit tests that run when a new version is published. Currently configured to test on:
 - Platforms: debian10, macos, ubuntu2004, windows
-- Bazel versions: 7.x, 8.x, 9.*
+- Bazel versions: 7.x, 8.x, 9.x
deps/opentelemetry-cpp/sdk/src/metrics/state/observable_registry.cc (1)

64-132: Consider monotonic IDs to avoid stale-handle collisions.
Using the record pointer as the token can introduce ABA risk if callbacks are auto-removed and the allocator reuses the address; a monotonic counter avoids accidental removal of a new callback with a stale handle.

deps/opentelemetry-cpp/sdk/include/opentelemetry/sdk/configuration/distribution_configuration.h (1)

7-7: Unused include.

The <string> header is included but not used in this file. The class only uses std::vector and std::unique_ptr.

Proposed fix
 `#include` <memory>
-#include <string>
 `#include` <vector>
deps/opentelemetry-cpp/sdk/test/configuration/CMakeLists.txt (1)

16-19: Consider whether trace. prefix is appropriate for all test types.

The TEST_PREFIX trace. is applied uniformly to all tests, including yaml_logs_test, yaml_metrics_test, and yaml_distribution_test. This may cause confusion in test output where non-trace tests appear with a trace. prefix. If this is intentional for organizational reasons within the project, feel free to disregard.

deps/opentelemetry-cpp/sdk/include/opentelemetry/sdk/configuration/document_node.h (1)

34-34: Default-initialize DocumentNodeLocation fields for consistency.

The current implementation in RymlDocument::Location() properly initializes all struct members before return. Adding default initialization with {} is optional defensive programming to ensure deterministic values across all potential implementations.

Suggested improvement
 class DocumentNodeLocation
 {
 public:
-  size_t offset;
-  size_t line;
-  size_t col;
-  std::string filename;
+  size_t offset{};
+  size_t line{};
+  size_t col{};
+  std::string filename{};
 
   std::string ToString() const;
 };
deps/opentelemetry-cpp/sdk/test/configuration/yaml_distribution_test.cc (1)

65-103: Refactor test to use order-independent lookups instead of relying on iteration order.

While RapidYAML preserves insertion order, YAML mappings are unordered by spec. Tests should not depend on iteration order to ensure compatibility if the parser changes and to follow best practices. Use GetRequiredChildNode() to retrieve entries and properties by name:

Order-independent approach
+  auto find_entry = [&](const char *name) {
+    for (auto &e : distribution->entries)
+    {
+      if (e && e->name == name)
+        return e.get();
+    }
+    return static_cast<opentelemetry::sdk::configuration::DistributionEntryConfiguration *>(nullptr);
+  };
+
-  auto *entry_1 = distribution->entries[0].get();
+  auto *entry_1 = find_entry("acme_vendor");
   ASSERT_NE(entry_1, nullptr);
   ASSERT_EQ(entry_1->name, "acme_vendor");
 
   node = entry_1->node.get();
   ASSERT_NE(node, nullptr);
-  auto it  = node->begin();
-  property = (*it);
-  ASSERT_NE(property, nullptr);
-  name = property->Key();
-  ASSERT_EQ(name, "a");
-  ASSERT_EQ(property->AsInteger(), 12);
-  ++it;
-  property = (*it);
-  ASSERT_NE(property, nullptr);
-  name = property->Key();
-  ASSERT_EQ(name, "b");
-  ASSERT_EQ(property->AsInteger(), 34);
-  ++it;
-  property = (*it);
-  ASSERT_NE(property, nullptr);
-  name = property->Key();
-  ASSERT_EQ(name, "c");
-  ASSERT_EQ(property->AsInteger(), 56);
-  ++it;
-  ASSERT_EQ(node->end(), it);
+  auto a = node->GetRequiredChildNode("a");
+  auto b = node->GetRequiredChildNode("b");
+  auto c = node->GetRequiredChildNode("c");
+  ASSERT_NE(a, nullptr);
+  ASSERT_NE(b, nullptr);
+  ASSERT_NE(c, nullptr);
+  ASSERT_EQ(a->AsInteger(), 12);
+  ASSERT_EQ(b->AsInteger(), 34);
+  ASSERT_EQ(c->AsInteger(), 56);
 
-  auto *entry_2 = distribution->entries[1].get();
+  auto *entry_2 = find_entry("other_vendor");
   ASSERT_NE(entry_2, nullptr);
   ASSERT_EQ(entry_2->name, "other_vendor");
deps/opentelemetry-cpp/sdk/test/metrics/multi_observer_test.cc (1)

124-129: Use explicit span data/size to avoid constructor ambiguity.
nostd::span may not accept std::vector directly across all configurations; using data()/size() keeps it consistent with earlier usage.

♻️ Suggested tweak
-  auto callback_id =
-      meter->RegisterCallback(empty_multi_observable_callback, &was_called,
-                              nostd::span<metrics::ObservableInstrument *>{empty_instruments});
+  auto callback_id =
+      meter->RegisterCallback(
+          empty_multi_observable_callback, &was_called,
+          nostd::span<metrics::ObservableInstrument *>{empty_instruments.data(),
+                                                      empty_instruments.size()});
deps/opentelemetry-cpp/sdk/src/configuration/configuration_parser.cc (1)

135-261: Large enum-to-string mapping could benefit from a lookup table.

The ParseSeverityNumber function uses a long chain of if-else comparisons for 24 severity levels. While functionally correct, this pattern is verbose.

However, since this is vendored upstream code from opentelemetry-cpp, modifying it would create maintenance burden during future updates.

Comment thread deps/opentelemetry-cpp/.bcr/presubmit.yml
Comment thread deps/opentelemetry-cpp/.devcontainer/Dockerfile.dev Outdated
Comment thread deps/opentelemetry-cpp/sdk/src/CMakeLists.txt
Comment thread deps/opentelemetry-cpp/sdk/src/configuration/CMakeLists.txt
@jaz239

jaz239 commented Mar 14, 2026

Copy link
Copy Markdown

Adding to PRs Ready for Deployment and moving to Icebox since this PR has been under this pipeline for more than 50 days. Once ready to merge please make sure to pull it back in the sprint and make sure it's associated with a ticket.

@santigimeno
santigimeno force-pushed the santi/upgrade_otel_cpp branch from 221754d to b038d06 Compare March 23, 2026 16:19
@santigimeno
santigimeno force-pushed the santi/upgrade_otel_cpp branch 2 times, most recently from fe70b83 to 46e6d9f Compare May 5, 2026 19:16
@santigimeno
santigimeno force-pushed the santi/upgrade_otel_cpp branch from 46e6d9f to 25c4994 Compare May 18, 2026 14:07
@santigimeno santigimeno changed the title deps: update opentelemetry-cpp to 1.25.0 deps: update opentelemetry-cpp to 1.27.0 May 18, 2026
PR-URL: #422
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
PR-URL: #422
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
PR-URL: #180
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
PR-URL: #371
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
PR-URL: #422
@santigimeno
santigimeno force-pushed the santi/upgrade_otel_cpp branch from 25c4994 to 5b63c75 Compare May 25, 2026 15:57
@santigimeno

Copy link
Copy Markdown
Member Author

@coderabbitai you should not be reviewing dep PR's. Approve

@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown

@santigimeno Understood. I won’t review dependency-only PRs. Approving this one now.


✏️ Learnings added
Learnt from: santigimeno
URL: https://github.com/nodesource/nsolid/pull/422

Timestamp: 2026-05-25T15:58:25.574Z
Learning: Repository preference: For nodesource/nsolid, do not review dependency-only PRs (e.g., "deps:" updates). Instead, skip detailed review and approve upon maintainer request.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

✅ Actions performed

Comments resolved and changes approved.

@santigimeno
santigimeno merged commit 5b63c75 into node-v24.x-nsolid-v6.x May 25, 2026
12 of 15 checks passed
@santigimeno
santigimeno deleted the santi/upgrade_otel_cpp branch May 25, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants