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

Move the unit package to the metric module #1903

Merged
merged 3 commits into from
May 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
This brings the export interface into compliance with the specification in that it now accepts an explicitly immutable type instead of just an implied one. (#1873)
- Unembed `SpanContext` in `Link`. (#1877)
- Spans created by the global `Tracer` obtained from `go.opentelemetry.io/otel`, prior to a functioning `TracerProvider` being set, now propagate the span context from their parent if one exists. (#1901)
- Move the `go.opentelemetry.io/otel/unit` package to `go.opentelemetry.io/otel/metric/unit`. (#1903)

### Deprecated

Expand Down
2 changes: 1 addition & 1 deletion bridge/opencensus/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/metric/number"
"go.opentelemetry.io/otel/metric/unit"
export "go.opentelemetry.io/otel/sdk/export/metric"
"go.opentelemetry.io/otel/sdk/export/metric/aggregation"
"go.opentelemetry.io/otel/sdk/resource"
"go.opentelemetry.io/otel/unit"
)

var errConversion = errors.New("Unable to convert from OpenCensus to OpenTelemetry")
Expand Down
2 changes: 1 addition & 1 deletion bridge/opencensus/exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/metric/number"
"go.opentelemetry.io/otel/metric/unit"
export "go.opentelemetry.io/otel/sdk/export/metric"
exportmetric "go.opentelemetry.io/otel/sdk/export/metric"
"go.opentelemetry.io/otel/sdk/export/metric/aggregation"
"go.opentelemetry.io/otel/sdk/resource"
"go.opentelemetry.io/otel/unit"
)

type fakeExporter struct {
Expand Down
2 changes: 1 addition & 1 deletion metric/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package metric // import "go.opentelemetry.io/otel/metric"

import (
"go.opentelemetry.io/otel/unit"
"go.opentelemetry.io/otel/metric/unit"
)

// InstrumentConfig contains options for metric instrument descriptors.
Expand Down
2 changes: 1 addition & 1 deletion metric/metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric/number"
"go.opentelemetry.io/otel/unit"
"go.opentelemetry.io/otel/metric/unit"
)

// MeterProvider supports named Meter instances.
Expand Down
2 changes: 1 addition & 1 deletion metric/metric_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/metric/number"
"go.opentelemetry.io/otel/metric/unit"
"go.opentelemetry.io/otel/oteltest"
"go.opentelemetry.io/otel/unit"

"github.com/google/go-cmp/cmp"
"github.com/stretchr/testify/assert"
Expand Down
2 changes: 1 addition & 1 deletion unit/doc.go → metric/unit/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
// This package is currently in a pre-GA phase. Backwards incompatible changes
// may be introduced in subsequent minor version releases as we work to track
// the evolving OpenTelemetry specification and user feedback.
package unit // import "go.opentelemetry.io/otel/unit"
package unit // import "go.opentelemetry.io/otel/metric/unit"
2 changes: 1 addition & 1 deletion unit/unit.go → metric/unit/unit.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package unit // import "go.opentelemetry.io/otel/unit"
package unit // import "go.opentelemetry.io/otel/metric/unit"

type Unit string

Expand Down