Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate instrument names when creating them #4210

Merged
merged 19 commits into from
Jun 9, 2023
Merged

Validate instrument names when creating them #4210

merged 19 commits into from
Jun 9, 2023

Conversation

dmathieu
Copy link
Member

@dmathieu dmathieu commented Jun 7, 2023

This validates instrument names when they are created, per the specification.

  • They are not null or empty strings.
  • They are case-insensitive, ASCII strings.
  • The first character must be an alphabetic character.
  • Subsequent characters must belong to the alphanumeric characters, '_', '.', and '-'.
  • They can have a maximum length of 63 characters.

Closes #4204.

@codecov
Copy link

codecov bot commented Jun 7, 2023

Codecov Report

Merging #4210 (7e33fe3) into main (4f48154) will decrease coverage by 0.1%.
The diff coverage is 68.9%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #4210     +/-   ##
=======================================
- Coverage   83.3%   83.3%   -0.1%     
=======================================
  Files        181     181             
  Lines      13940   13986     +46     
=======================================
+ Hits       11623   11657     +34     
- Misses      2096    2102      +6     
- Partials     221     227      +6     
Impacted Files Coverage Δ
sdk/metric/meter.go 85.9% <68.9%> (-4.4%) ⬇️

... and 2 files with indirect coverage changes

sdk/metric/meter.go Outdated Show resolved Hide resolved
sdk/metric/meter.go Outdated Show resolved Hide resolved
sdk/metric/meter.go Outdated Show resolved Hide resolved
sdk/metric/meter.go Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
sdk/metric/meter.go Outdated Show resolved Hide resolved
Copy link
Contributor

@MrAlias MrAlias left a comment

Choose a reason for hiding this comment

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

🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Validate the instrument when a Meter creates the instrument
3 participants