feat(sdk): relax instrument name validation; remove experimental_metrics_disable_name_validation feature#3517
Draft
cijothomas wants to merge 2 commits into
Draft
Conversation
…_name_validation feature
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3517 +/- ##
=======================================
+ Coverage 82.8% 83.0% +0.1%
=======================================
Files 130 130
Lines 27289 27362 +73
=======================================
+ Hits 22622 22726 +104
+ Misses 4667 4636 -31 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft — depends on opentelemetry-specification#5092. Will be ready for review once the spec PR is merged.
Description
Relaxes the SDK instrument-name validation to match the proposed expanded character set in opentelemetry-specification#5092:
:,\,(,),%,*,#, and space to the allowed character set.name must be non-emptyrule are unchanged.This enables Windows performance counter style names (e.g.
\Processor(_Total)\% Processor Time,\.NET CLR Memory(*)\# Bytes in all Heaps) to be used directly as instrument names without workarounds.Removes the
experimental_metrics_disable_name_validationCargo feature (introduced in #2538 specifically for these use cases). With the relaxed validation, the workaround is no longer needed and the feature can be retired.Backwards compatibility
Strict superset of the existing rule. Every name valid under the old validator remains valid; some previously-rejected names are now accepted. Consumers that enabled
experimental_metrics_disable_name_validationshould drop the feature from theirCargo.toml.