-
Notifications
You must be signed in to change notification settings - Fork 825
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
Default Instrument unit does not comply with spec #2910
Comments
Hmm that's an interesting one. AFAIK the "default unit" was |
+1 for treating null/undefined as an empty string. This allows backends to distinguish between a truely undefined unit and This sounds like a candidate for "good first issue". 🙂 |
I'll tackle this 👍 |
@andyfleming any update on this? |
Getting back to this now. Opened up a PR. There's an outstanding issue, but we can continue that discussion over there. |
Currently the spec states here that:
However, the current implementation does change
undefined
andnull
units to'1'
increateInstrumentDescriptor()
, which is different from the empty string. An empty string is usually kept.The Metrics API and SDK specs does not define a "default" unit, therefore to make this compliant with the spec we have two options:
'1'
null
andundefined
as an empty string.I think the spec allows for these two options so it might also make sense to ask for clarification in the spec repo.
The text was updated successfully, but these errors were encountered: