Skip to content

Remove the instrument metadata validator workaround - #143

Merged
ltowarek merged 3 commits into
mainfrom
remove-instrument-validator-workaround
Oct 21, 2026
Merged

ltowarek merged 3 commits into
mainfrom
remove-instrument-validator-workaround

Conversation

@ltowarek

@ltowarek ltowarek commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Removes the workaround from #142 now that opentelemetry-cpp validates instrument names and units without std::regex (open-telemetry/opentelemetry-cpp#4715).

Change

  • Bumps third_party/opentelemetry-cpp from v1.28.0 to upstream main 7f93577b (after v1.29.0, not yet in a release), which contains #4715. Upstream renamed its CMake options to OTELCPP_* and fails to configure when WITH_ETW is set on a non-Windows target, so the component sets the new names and drops WITH_ETW and WITH_ABSEIL. This supersedes Dependabot Bump third_party/opentelemetry-cpp from 6f65c3e to eb92442 #126.
  • Deletes src/workarounds/instrument_metadata_validator.cc and the CMake swap that replaced the SDK's translation unit.
  • Removes the README Workarounds row.
  • Keeps test/max_length_instrument_metadata_on_small_stack, which now checks the upstream code: a 255-character name and a 63-character unit created on a 4 KB task.

Verification

With the CI image, all 11 CI matrix projects build. All 8 QEMU projects pass, including max_length_instrument_metadata_on_small_stack at 14/14 without the workaround.

Closes #141.

🤖 Generated with Claude Code

ltowarek and others added 2 commits October 21, 2026 19:53
The pin moves from v1.28.0 to upstream main, past v1.29.0 and not yet
in a release, to pick up the regex-free InstrumentMetaDataValidator
(open-telemetry/opentelemetry-cpp#4715). Upstream renamed its CMake
options to OTELCPP_* and fails to configure when WITH_ETW is set on a
non-Windows target, so the component sets the new names and drops
WITH_ETW and WITH_ABSEIL, which upstream no longer reads.

Refs #141

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
opentelemetry-cpp now validates instrument names and units without
std::regex, so the SDK's own translation unit fits a small task stack.
test/max_length_instrument_metadata_on_small_stack stays and now checks
the upstream code.

Closes #141

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ltowarek
ltowarek force-pushed the remove-instrument-validator-workaround branch from 9dcd010 to 2242caf Compare October 21, 2026 19:02
@ltowarek
ltowarek marked this pull request as ready for review October 21, 2026 19:02
No example, test, or integration registers a View, so the row reported
on nothing this component ships.

Refs #141

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ltowarek
ltowarek enabled auto-merge (squash) October 21, 2026 20:22
@ltowarek
ltowarek merged commit dd73720 into main Oct 21, 2026
15 checks passed
@ltowarek
ltowarek deleted the remove-instrument-validator-workaround branch October 21, 2026 20:35
ltowarek added a commit that referenced this pull request Nov 6, 2026
main's instrument metadata checks (#142, #143) need opentelemetry-cpp
1.30.0, which the previous PR2 pin predates. The fork's
otlp-json-no-protobuf head carries the same PR2 work on top of it.

The OTLP/JSON trace, log and metric bodies match those the cJSON
backend built under the old pin, apart from the SDK version string and
doubles cJSON rounded: it prints 0.1 + 0.2 as "0.3", json_generator
as "0.30000000000000004", which reads back as the same double.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

std::regex validation recurses per character and overflows small task stacks

1 participant