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

Deprecate metric/unit and use a string for units in the metric API/SDK #3776

Merged
merged 5 commits into from
Feb 27, 2023

Conversation

MrAlias
Copy link
Contributor

@MrAlias MrAlias commented Feb 24, 2023

Part of #3775

The OTel specification states a unit needs to be a string that is not validated by the API or SDK, and the API design of the unit package is brittle and will not evolve well. This deprecates the unit package so it will be removed in the next release, and replace all use of the Unit type with a string throughout the metric signal.

@MrAlias MrAlias added pkg:API Related to an API package pkg:SDK Related to an SDK package area:metrics Part of OpenTelemetry Metrics labels Feb 24, 2023
@MrAlias MrAlias added this to the Metric v0.37.0 milestone Feb 24, 2023
@codecov
Copy link

codecov bot commented Feb 24, 2023

Codecov Report

Merging #3776 (1a2cf87) into main (17e5d0f) will decrease coverage by 0.1%.
The diff coverage is 100.0%.

❗ Current head 1a2cf87 differs from pull request most recent head a934378. Consider uploading reports for the commit a934378 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #3776     +/-   ##
=======================================
- Coverage   81.7%   81.7%   -0.1%     
=======================================
  Files        167     167             
  Lines      12462   12450     -12     
=======================================
- Hits       10184   10172     -12     
  Misses      2063    2063             
  Partials     215     215             
Impacted Files Coverage Δ
exporters/otlp/otlpmetric/internal/otest/client.go 97.1% <ø> (ø)
exporters/prometheus/exporter.go 83.5% <ø> (ø)
sdk/metric/metricdata/data.go 57.1% <ø> (ø)
sdk/metric/pipeline.go 90.5% <ø> (-0.1%) ⬇️
bridge/opencensus/internal/ocmetric/metric.go 93.3% <100.0%> (-0.5%) ⬇️
metric/instrument/asyncfloat64.go 100.0% <100.0%> (ø)
metric/instrument/asyncint64.go 100.0% <100.0%> (ø)
metric/instrument/instrument.go 100.0% <100.0%> (ø)
metric/instrument/syncfloat64.go 100.0% <100.0%> (ø)
metric/instrument/syncint64.go 100.0% <100.0%> (ø)
... and 3 more

Deprecate the units package. This package will not be included in the
metric GA.
@MrAlias MrAlias changed the title Replace Unit from metric/unit with string Deprecate metric/unit and use a string for units in the metric API/SDK Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:metrics Part of OpenTelemetry Metrics pkg:API Related to an API package pkg:SDK Related to an SDK package
Projects
No open projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants