Skip to content

Limit character set according to spec#3821

Merged
cijothomas merged 4 commits intoopen-telemetry:mainfrom
mic-max:instrument-naming
Oct 28, 2022
Merged

Limit character set according to spec#3821
cijothomas merged 4 commits intoopen-telemetry:mainfrom
mic-max:instrument-naming

Conversation

@mic-max
Copy link
Copy Markdown
Contributor

@mic-max mic-max commented Oct 25, 2022

Changes

\w matches to more than just the intended a-zA-Z0-9_ https://learn.microsoft.com/en-us/dotnet/standard/base-types/character-classes-in-regular-expressions#word-character-w

Before the change the addition to InvalidInstrumentNames would fail the test. the value is . The Micro is considered Letter, Lowercase by the \w match. But this is just to show that any character belonging to the categories shown could have made an instrument name become out of spec.

For significant contributions please make sure you have completed the following items:

  • Appropriate CHANGELOG.md updated for non-trivial changes
  • Design discussion issue #
  • Changes in public API reviewed

@mic-max mic-max marked this pull request as ready for review October 25, 2022 23:14
@mic-max mic-max requested a review from a team October 25, 2022 23:14
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 25, 2022

Codecov Report

Merging #3821 (18239e8) into main (f921ae3) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3821      +/-   ##
==========================================
+ Coverage   87.46%   87.48%   +0.01%     
==========================================
  Files         280      280              
  Lines       10767    10767              
==========================================
+ Hits         9417     9419       +2     
+ Misses       1350     1348       -2     
Impacted Files Coverage Δ
...lemetry/Metrics/Builder/MeterProviderBuilderSdk.cs 92.85% <100.00%> (ø)
...ZPages/Implementation/ZPagesExporterEventSource.cs 56.25% <0.00%> (-6.25%) ⬇️
...tpListener/Internal/PrometheusCollectionManager.cs 73.62% <0.00%> (-2.20%) ⬇️
...metryProtocol/Implementation/ActivityExtensions.cs 96.21% <0.00%> (+1.08%) ⬆️
...emetry.Api/Internal/OpenTelemetryApiEventSource.cs 82.35% <0.00%> (+2.94%) ⬆️
...lementation/SqlClientInstrumentationEventSource.cs 75.00% <0.00%> (+4.16%) ⬆️
...Propagators/OpenTelemetryPropagatorsEventSource.cs 100.00% <0.00%> (+12.50%) ⬆️

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