1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-09-16 09:26:25 +02:00

Move the unit package to the metric module (#1903)

This commit is contained in:
Tyler Yahn
2021-05-12 18:51:26 +00:00
committed by GitHub
parent 63e0ecfc22
commit 6219221fc5
8 changed files with 8 additions and 7 deletions

View File

@@ -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) 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) - 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) - 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 ### Deprecated

View File

@@ -28,10 +28,10 @@ import (
"go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/metric/number" "go.opentelemetry.io/otel/metric/number"
"go.opentelemetry.io/otel/metric/unit"
export "go.opentelemetry.io/otel/sdk/export/metric" export "go.opentelemetry.io/otel/sdk/export/metric"
"go.opentelemetry.io/otel/sdk/export/metric/aggregation" "go.opentelemetry.io/otel/sdk/export/metric/aggregation"
"go.opentelemetry.io/otel/sdk/resource" "go.opentelemetry.io/otel/sdk/resource"
"go.opentelemetry.io/otel/unit"
) )
var errConversion = errors.New("Unable to convert from OpenCensus to OpenTelemetry") var errConversion = errors.New("Unable to convert from OpenCensus to OpenTelemetry")

View File

@@ -29,11 +29,11 @@ import (
"go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/metric/number" "go.opentelemetry.io/otel/metric/number"
"go.opentelemetry.io/otel/metric/unit"
export "go.opentelemetry.io/otel/sdk/export/metric" export "go.opentelemetry.io/otel/sdk/export/metric"
exportmetric "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/export/metric/aggregation"
"go.opentelemetry.io/otel/sdk/resource" "go.opentelemetry.io/otel/sdk/resource"
"go.opentelemetry.io/otel/unit"
) )
type fakeExporter struct { type fakeExporter struct {

View File

@@ -15,7 +15,7 @@
package metric // import "go.opentelemetry.io/otel/metric" package metric // import "go.opentelemetry.io/otel/metric"
import ( import (
"go.opentelemetry.io/otel/unit" "go.opentelemetry.io/otel/metric/unit"
) )
// InstrumentConfig contains options for metric instrument descriptors. // InstrumentConfig contains options for metric instrument descriptors.

View File

@@ -19,7 +19,7 @@ import (
"go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric/number" "go.opentelemetry.io/otel/metric/number"
"go.opentelemetry.io/otel/unit" "go.opentelemetry.io/otel/metric/unit"
) )
// MeterProvider supports named Meter instances. // MeterProvider supports named Meter instances.

View File

@@ -22,8 +22,8 @@ import (
"go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/metric/number" "go.opentelemetry.io/otel/metric/number"
"go.opentelemetry.io/otel/metric/unit"
"go.opentelemetry.io/otel/oteltest" "go.opentelemetry.io/otel/oteltest"
"go.opentelemetry.io/otel/unit"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"

View File

@@ -17,4 +17,4 @@
// This package is currently in a pre-GA phase. Backwards incompatible changes // 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 // may be introduced in subsequent minor version releases as we work to track
// the evolving OpenTelemetry specification and user feedback. // the evolving OpenTelemetry specification and user feedback.
package unit // import "go.opentelemetry.io/otel/unit" package unit // import "go.opentelemetry.io/otel/metric/unit"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
package unit // import "go.opentelemetry.io/otel/unit" package unit // import "go.opentelemetry.io/otel/metric/unit"
type Unit string type Unit string