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

Stop validating instrument unit #5279

Merged
merged 1 commit into from
Mar 17, 2023

Conversation

jack-berg
Copy link
Member

Spec PR #3171 clears up previous ambiguity in the spec around whether SDKs are supposed validate instrument unit.

Its now quite clear that the expectations about unit are for callers. The SDK itself is supposed to treat the value as an opaque string:

When a Meter creates an instrument, it SHOULD NOT validate the instrument unit.

This is in contrast to instrument name, which the SDK is supposed to validate:

When a Meter creates an instrument, it SHOULD validate the instrument name
conforms to the instrument name syntax

Also took it upon myself to suppress some new test logs that have popped up after recent commits.

@jack-berg jack-berg requested a review from a team as a code owner March 9, 2023 20:12
@codecov
Copy link

codecov bot commented Mar 9, 2023

Codecov Report

Patch coverage: 92.30% and project coverage change: -0.03 ⚠️

Comparison is base (2babc69) 90.98% compared to head (ce71a4c) 90.96%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5279      +/-   ##
============================================
- Coverage     90.98%   90.96%   -0.03%     
+ Complexity     4908     4897      -11     
============================================
  Files           552      551       -1     
  Lines         14489    14475      -14     
  Branches       1372     1368       -4     
============================================
- Hits          13183    13167      -16     
- Misses          906      909       +3     
+ Partials        400      399       -1     
Impacted Files Coverage Δ
...in/java/io/opentelemetry/sdk/metrics/SdkMeter.java 98.03% <90.90%> (-1.97%) ⬇️
.../io/opentelemetry/api/internal/ApiUsageLogger.java 100.00% <100.00%> (ø)
...lemetry/sdk/metrics/AbstractInstrumentBuilder.java 100.00% <100.00%> (+2.08%) ⬆️

... and 4 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jack-berg jack-berg merged commit ca07163 into open-telemetry:main Mar 17, 2023
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.

None yet

2 participants