Repository: GoogleCloudPlatform/opentelemetry-operations-go
Pull request #120 (2020-11-23 23:31:11)

Update to otel 0.14
Hi guys

As i was testing otel 0.14 i updated your project. Maybe the changes work with you.

Greets from Switzerland

adlerhurst: hi @dashpole 

thanks for your review. i've corrected the files.

I've also changed the used otel version in.
https://github.com/adlerhurst/opentelemetry-operations-go/blob/20c83ede56cac1b365904bda780e79bba9c9cf46/exporter/trace/version.go#L20
and
https://github.com/adlerhurst/opentelemetry-operations-go/blob/20c83ede56cac1b365904bda780e79bba9c9cf46/exporter/metric/version.go#L20
dashpole: closed/reopened to poke tests

Patch:
diff --git a/Makefile b/Makefile
index 61d146c..3c5454f 100644
--- a/Makefile
+++ b/Makefile
@@ -131,7 +131,7 @@ gotidy:
 update-dep:
 	$(MAKE) for-all CMD="$(PWD)/internal/buildscripts/update-dep"
 
-OTEL_VERSION=v0.13.0
+OTEL_VERSION=v0.14.0
 
 .PHONY: update-otel
 update-otel:
diff --git a/example/metric/example.go b/example/metric/example.go
index d900979..ae110ed 100644
--- a/example/metric/example.go
+++ b/example/metric/example.go
@@ -23,8 +23,8 @@ import (
 
 	mexporter "github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric"
 
-	"go.opentelemetry.io/otel/api/metric"
 	"go.opentelemetry.io/otel/label"
+	"go.opentelemetry.io/otel/metric"
 	"go.opentelemetry.io/otel/sdk/metric/controller/push"
 	"go.opentelemetry.io/otel/sdk/resource"
 )
@@ -62,12 +62,10 @@ func main() {
 	// the function to handle the common resource just ignore the passed resource and
 	// it returned hard coded "global" resource.
 	// This should be fixed in #29.
-	resOpt := push.WithResource(
-		resource.New(
-			label.String("instance_id", "abc123"),
-			label.String("application", "example-app"),
-		),
-	)
+	resOpt := push.WithResource(resource.NewWithAttributes(
+		label.String("instance_id", "abc123"),
+		label.String("application", "example-app"),
+	))
 	pusher, err := mexporter.InstallNewPipeline(opts, resOpt)
 	if err != nil {
 		log.Fatalf("Failed to establish pipeline: %v", err)
diff --git a/example/metric/go.mod b/example/metric/go.mod
index 5e5626f..4e444c1 100644
--- a/example/metric/go.mod
+++ b/example/metric/go.mod
@@ -6,6 +6,6 @@ replace github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metr
 
 require (
 	github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.13.0
-	go.opentelemetry.io/otel v0.13.0
-	go.opentelemetry.io/otel/sdk v0.13.0
+	go.opentelemetry.io/otel v0.14.0
+	go.opentelemetry.io/otel/sdk v0.14.0
 )
diff --git a/example/metric/go.sum b/example/metric/go.sum
index dba774d..8dfeb68 100644
--- a/example/metric/go.sum
+++ b/example/metric/go.sum
@@ -94,8 +94,8 @@ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
 github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=
 github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
-github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo=
+github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g=
 github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
 github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
@@ -143,10 +143,10 @@ go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8=
 go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
 go.opencensus.io v0.22.4 h1:LYy1Hy3MJdrCdMwwzxA/dRok4ejH+RwNGbuoD9fCjto=
 go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
-go.opentelemetry.io/otel v0.13.0 h1:2isEnyzjjJZq6r2EKMsFj4TxiQiexsM04AVhwbR/oBA=
-go.opentelemetry.io/otel v0.13.0/go.mod h1:dlSNewoRYikTkotEnxdmuBHgzT+k/idJSfDv/FxEnOY=
-go.opentelemetry.io/otel/sdk v0.13.0 h1:4VCfpKamZ8GtnepXxMRurSpHpMKkcxhtO33z1S4rGDQ=
-go.opentelemetry.io/otel/sdk v0.13.0/go.mod h1:dKvLH8Uu8LcEPlSAUsfW7kMGaJBhk/1NYvpPZ6wIMbU=
+go.opentelemetry.io/otel v0.14.0 h1:YFBEfjCk9MTjaytCNSUkp9Q8lF7QJezA06T71FbQxLQ=
+go.opentelemetry.io/otel v0.14.0/go.mod h1:vH5xEuwy7Rts0GNtsCW3HYQoZDY+OmBJ6t1bFGGlxgw=
+go.opentelemetry.io/otel/sdk v0.14.0 h1:Pqgd85y5XhyvHQlOxkKW+FD4DAX7AoeaNIDKC2VhfHQ=
+go.opentelemetry.io/otel/sdk v0.14.0/go.mod h1:kGO5pEMSNqSJppHAm8b73zztLxB5fgDQnD56/dl5xqE=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
 golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
diff --git a/example/trace/http/client/client.go b/example/trace/http/client/client.go
index 4bfa72b..fc02a26 100644
--- a/example/trace/http/client/client.go
+++ b/example/trace/http/client/client.go
@@ -19,20 +19,17 @@ import (
 	"fmt"
 	"io/ioutil"
 	"log"
+	"net/http"
 	"os"
 
+	"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
 	"go.opentelemetry.io/otel"
-	"go.opentelemetry.io/otel/semconv"
-
-	"net/http"
-
+	"go.opentelemetry.io/otel/baggage"
 	"go.opentelemetry.io/otel/codes"
-
-	"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
-	"go.opentelemetry.io/otel/api/global"
-	"go.opentelemetry.io/otel/api/trace"
 	"go.opentelemetry.io/otel/label"
 	sdktrace "go.opentelemetry.io/otel/sdk/trace"
+	"go.opentelemetry.io/otel/semconv"
+	"go.opentelemetry.io/otel/trace"
 
 	texporter "github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace"
 )
@@ -57,10 +54,10 @@ func initTracer() func() {
 func main() {
 	flush := initTracer()
 	defer flush()
-	tr := global.TracerProvider().Tracer("cloudtrace/example/client")
+	tr := otel.Tracer("cloudtrace/example/client")
 
 	client := http.Client{Transport: otelhttp.NewTransport(http.DefaultTransport)}
-	ctx := otel.ContextWithBaggageValues(context.Background(),
+	ctx := baggage.ContextWithValues(context.Background(),
 		label.String("username", "donuts"),
 	)
 
diff --git a/example/trace/http/go.mod b/example/trace/http/go.mod
index 48ab2c9..f23c1c9 100644
--- a/example/trace/http/go.mod
+++ b/example/trace/http/go.mod
@@ -6,8 +6,10 @@ replace github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trac
 
 require (
 	github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v0.13.0
-	go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.13.0
-	go.opentelemetry.io/otel v0.13.0
-	go.opentelemetry.io/otel/sdk v0.13.0
+	github.com/davecgh/go-spew v1.1.1 // indirect
+	go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.14.0
+	go.opentelemetry.io/otel v0.14.0
+	go.opentelemetry.io/otel/sdk v0.14.0
 	golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 // indirect
+	gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
 )
diff --git a/example/trace/http/go.sum b/example/trace/http/go.sum
index 394950c..22e8f25 100644
--- a/example/trace/http/go.sum
+++ b/example/trace/http/go.sum
@@ -88,8 +88,8 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
 github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
 github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
-github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo=
+github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
 github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
 github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
@@ -134,14 +134,14 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
 go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
 go.opencensus.io v0.22.4 h1:LYy1Hy3MJdrCdMwwzxA/dRok4ejH+RwNGbuoD9fCjto=
 go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
-go.opentelemetry.io/contrib v0.13.0 h1:q34CFu5REx9Dt2ksESHC/doIjFJkEg1oV3aSwlL5JR0=
-go.opentelemetry.io/contrib v0.13.0/go.mod h1:HzCu6ebm0ywgNxGaEfs3izyJOMP4rZnzxycyTgpI5Sg=
-go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.13.0 h1:dnZy1afzxEDrHybTYoJE1bQ3fphNwZF2ipSsynlITP4=
-go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.13.0/go.mod h1:SeQm4RTCcZ2/hlMSTuHb7nwIROe5odBtgfKx+7MMqEs=
-go.opentelemetry.io/otel v0.13.0 h1:2isEnyzjjJZq6r2EKMsFj4TxiQiexsM04AVhwbR/oBA=
-go.opentelemetry.io/otel v0.13.0/go.mod h1:dlSNewoRYikTkotEnxdmuBHgzT+k/idJSfDv/FxEnOY=
-go.opentelemetry.io/otel/sdk v0.13.0 h1:4VCfpKamZ8GtnepXxMRurSpHpMKkcxhtO33z1S4rGDQ=
-go.opentelemetry.io/otel/sdk v0.13.0/go.mod h1:dKvLH8Uu8LcEPlSAUsfW7kMGaJBhk/1NYvpPZ6wIMbU=
+go.opentelemetry.io/contrib v0.14.0 h1:ntrQmEKqYQL6z2YNCk+3Cg4lpJwd9aHK/JMOFpda8yc=
+go.opentelemetry.io/contrib v0.14.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc=
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.14.0 h1:f7M+R7vO1Q8hq29huD14olXE9Seor47BjPzs1p+VW38=
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.14.0/go.mod h1:Rw8yZpEGuffGoRJ8yoxjvQd3qZZuWfDj163NEfux2sw=
+go.opentelemetry.io/otel v0.14.0 h1:YFBEfjCk9MTjaytCNSUkp9Q8lF7QJezA06T71FbQxLQ=
+go.opentelemetry.io/otel v0.14.0/go.mod h1:vH5xEuwy7Rts0GNtsCW3HYQoZDY+OmBJ6t1bFGGlxgw=
+go.opentelemetry.io/otel/sdk v0.14.0 h1:Pqgd85y5XhyvHQlOxkKW+FD4DAX7AoeaNIDKC2VhfHQ=
+go.opentelemetry.io/otel/sdk v0.14.0/go.mod h1:kGO5pEMSNqSJppHAm8b73zztLxB5fgDQnD56/dl5xqE=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
 golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
diff --git a/example/trace/http/server/server.go b/example/trace/http/server/server.go
index d171f01..3a75c31 100644
--- a/example/trace/http/server/server.go
+++ b/example/trace/http/server/server.go
@@ -21,8 +21,9 @@ import (
 	"os"
 
 	otelhttp "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
-	"go.opentelemetry.io/otel/api/trace"
+	"go.opentelemetry.io/otel/label"
 	sdktrace "go.opentelemetry.io/otel/sdk/trace"
+	"go.opentelemetry.io/otel/trace"
 
 	cloudtrace "github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace"
 )
@@ -51,7 +52,7 @@ func main() {
 	helloHandler := func(w http.ResponseWriter, req *http.Request) {
 		ctx := req.Context()
 		span := trace.SpanFromContext(ctx)
-		span.AddEvent(ctx, "handling this...")
+		span.SetAttributes(label.String("server", "handling this..."))
 
 		_, _ = io.WriteString(w, "Hello, world!\n")
 	}
diff --git a/exporter/metric/README.md b/exporter/metric/README.md
index b081cf3..e0214ee 100644
--- a/exporter/metric/README.md
+++ b/exporter/metric/README.md
@@ -19,7 +19,7 @@ After you import the metric exporter package, then register the exporter to the
 package main
 
 import (
-    "go.opentelemetry.io/otel/api/metric"
+    "go.opentelemetry.io/otel/metric"
     "go.opentelemetry.io/otel/label"
     "go.opentelemetry.io/otel/sdk/metric/controller/push"
     "go.opentelemetry.io/otel/sdk/resource"
diff --git a/exporter/metric/cloudmonitoring.go b/exporter/metric/cloudmonitoring.go
index d411f2f..8547d0e 100644
--- a/exporter/metric/cloudmonitoring.go
+++ b/exporter/metric/cloudmonitoring.go
@@ -20,13 +20,12 @@ import (
 	"fmt"
 	"time"
 
-	"go.opentelemetry.io/otel/api/metric"
-	"go.opentelemetry.io/otel/sdk/export/metric/aggregation"
-
+	"go.opentelemetry.io/otel/metric"
 	export "go.opentelemetry.io/otel/sdk/export/metric"
-	"golang.org/x/oauth2/google"
+	"go.opentelemetry.io/otel/sdk/export/metric/aggregation"
 
 	monitoring "cloud.google.com/go/monitoring/apiv3/v2"
+	"golang.org/x/oauth2/google"
 )
 
 const (
@@ -87,7 +86,7 @@ func (e *Exporter) Export(ctx context.Context, cps export.CheckpointSet) error {
 	return e.metricExporter.ExportMetrics(ctx, cps)
 }
 
-// ExportKindFor
+// ExportKindFor returns cumulative export kind
 func (e *Exporter) ExportKindFor(*metric.Descriptor, aggregation.Kind) export.ExportKind {
-	return export.CumulativeExporter
+	return export.CumulativeExportKind
 }
diff --git a/exporter/metric/error.go b/exporter/metric/error.go
index 7d68b81..78ac26b 100644
--- a/exporter/metric/error.go
+++ b/exporter/metric/error.go
@@ -18,9 +18,9 @@ import (
 	"errors"
 	"fmt"
 
+	"go.opentelemetry.io/otel/metric"
+	"go.opentelemetry.io/otel/metric/number"
 	"go.opentelemetry.io/otel/sdk/export/metric/aggregation"
-
-	apimetric "go.opentelemetry.io/otel/api/metric"
 )
 
 var (
@@ -36,17 +36,17 @@ func (e errUnsupportedAggregation) Error() string {
 }
 
 type errUnexpectedNumberKind struct {
-	kind apimetric.NumberKind
+	kind number.Kind
 }
 
 func (e errUnexpectedNumberKind) Error() string {
 	return fmt.Sprintf("the number kind is unexpected: %v", e.kind)
 }
 
-type errUnexpectedMetricKind struct {
-	kind apimetric.Kind
+type errUnexpectedInstrumentKind struct {
+	kind metric.InstrumentKind
 }
 
-func (e errUnexpectedMetricKind) Error() string {
+func (e errUnexpectedInstrumentKind) Error() string {
 	return fmt.Sprintf("the metric kind is unexpected: %v", e.kind)
 }
diff --git a/exporter/metric/go.mod b/exporter/metric/go.mod
index cc17d6c..5301bb7 100644
--- a/exporter/metric/go.mod
+++ b/exporter/metric/go.mod
@@ -8,8 +8,8 @@ require (
 	github.com/golang/protobuf v1.4.2
 	github.com/googleinterns/cloud-operations-api-mock v0.0.0-20200709193332-a1e58c29bdd3
 	github.com/stretchr/testify v1.6.1
-	go.opentelemetry.io/otel v0.13.0
-	go.opentelemetry.io/otel/sdk v0.13.0
+	go.opentelemetry.io/otel v0.14.0
+	go.opentelemetry.io/otel/sdk v0.14.0
 	golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
 	golang.org/x/sys v0.0.0-20200828194041-157a740278f4 // indirect
 	google.golang.org/api v0.30.0
diff --git a/exporter/metric/go.sum b/exporter/metric/go.sum
index 9a270bc..92f6a70 100644
--- a/exporter/metric/go.sum
+++ b/exporter/metric/go.sum
@@ -99,8 +99,8 @@ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
 github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=
 github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
-github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo=
+github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g=
 github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
 github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
@@ -149,10 +149,10 @@ go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8=
 go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
 go.opencensus.io v0.22.4 h1:LYy1Hy3MJdrCdMwwzxA/dRok4ejH+RwNGbuoD9fCjto=
 go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
-go.opentelemetry.io/otel v0.13.0 h1:2isEnyzjjJZq6r2EKMsFj4TxiQiexsM04AVhwbR/oBA=
-go.opentelemetry.io/otel v0.13.0/go.mod h1:dlSNewoRYikTkotEnxdmuBHgzT+k/idJSfDv/FxEnOY=
-go.opentelemetry.io/otel/sdk v0.13.0 h1:4VCfpKamZ8GtnepXxMRurSpHpMKkcxhtO33z1S4rGDQ=
-go.opentelemetry.io/otel/sdk v0.13.0/go.mod h1:dKvLH8Uu8LcEPlSAUsfW7kMGaJBhk/1NYvpPZ6wIMbU=
+go.opentelemetry.io/otel v0.14.0 h1:YFBEfjCk9MTjaytCNSUkp9Q8lF7QJezA06T71FbQxLQ=
+go.opentelemetry.io/otel v0.14.0/go.mod h1:vH5xEuwy7Rts0GNtsCW3HYQoZDY+OmBJ6t1bFGGlxgw=
+go.opentelemetry.io/otel/sdk v0.14.0 h1:Pqgd85y5XhyvHQlOxkKW+FD4DAX7AoeaNIDKC2VhfHQ=
+go.opentelemetry.io/otel/sdk v0.14.0/go.mod h1:kGO5pEMSNqSJppHAm8b73zztLxB5fgDQnD56/dl5xqE=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
 golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
diff --git a/exporter/metric/metric.go b/exporter/metric/metric.go
index a045f48..86bc320 100644
--- a/exporter/metric/metric.go
+++ b/exporter/metric/metric.go
@@ -21,8 +21,9 @@ import (
 	"strings"
 	"time"
 
-	"go.opentelemetry.io/otel/api/global"
-	apimetric "go.opentelemetry.io/otel/api/metric"
+	"go.opentelemetry.io/otel"
+	"go.opentelemetry.io/otel/metric"
+	"go.opentelemetry.io/otel/metric/number"
 	export "go.opentelemetry.io/otel/sdk/export/metric"
 	"go.opentelemetry.io/otel/sdk/metric/aggregator/lastvalue"
 	"go.opentelemetry.io/otel/sdk/metric/aggregator/minmaxsumcount"
@@ -52,7 +53,7 @@ type key struct {
 	libraryname string
 }
 
-func keyOf(descriptor *apimetric.Descriptor) key {
+func keyOf(descriptor *metric.Descriptor) key {
 	return key{
 		name:        descriptor.Name(),
 		libraryname: descriptor.InstrumentationName(),
@@ -147,7 +148,7 @@ func InstallNewPipeline(opts []Option, popts ...push.Option) (*push.Controller,
 	if err != nil {
 		return nil, err
 	}
-	global.SetMeterProvider(pusher.MeterProvider())
+	otel.SetMeterProvider(pusher.MeterProvider())
 	return pusher, err
 }
 
@@ -189,7 +190,7 @@ func (me *metricExporter) ExportMetrics(ctx context.Context, cps export.Checkpoi
 // if the descriptor is not registered in Cloud Monitoring yet.
 func (me *metricExporter) exportMetricDescriptor(ctx context.Context, cps export.CheckpointSet) error {
 	mds := make(map[key]*googlemetricpb.MetricDescriptor)
-	aggError := cps.ForEach(export.CumulativeExporter, func(r export.Record) error {
+	aggError := cps.ForEach(export.CumulativeExportKindSelector(), func(r export.Record) error {
 		k := keyOf(r.Descriptor())
 
 		if _, ok := me.mdCache[k]; ok {
@@ -249,7 +250,7 @@ func (me *metricExporter) createMetricDescriptorIfNeeded(ctx context.Context, md
 func (me *metricExporter) exportTimeSeries(ctx context.Context, cps export.CheckpointSet) error {
 	tss := []*monitoringpb.TimeSeries{}
 
-	aggError := cps.ForEach(export.CumulativeExporter, func(r export.Record) error {
+	aggError := cps.ForEach(export.CumulativeExportKindSelector(), func(r export.Record) error {
 		ts, err := me.recordToTspb(&r)
 		if err != nil {
 			return err
@@ -300,7 +301,7 @@ func (me *metricExporter) recordToTspb(r *export.Record) (*monitoringpb.TimeSeri
 
 // descToMetricType converts descriptor to MetricType proto type.
 // Basically this returns default value ("custom.googleapis.com/opentelemetry/[metric type]")
-func (me *metricExporter) descToMetricType(desc *apimetric.Descriptor) string {
+func (me *metricExporter) descToMetricType(desc *metric.Descriptor) string {
 	if formatter := me.o.MetricDescriptorTypeFormatter; formatter != nil {
 		return formatter(desc)
 	}
@@ -431,16 +432,16 @@ func transformResource(match, input map[string]string) (map[string]string, bool)
 // recordToMdpbKindType return the mapping from OTel's record descriptor to
 // Cloud Monitoring's MetricKind and ValueType.
 func recordToMdpbKindType(r *export.Record) (googlemetricpb.MetricDescriptor_MetricKind, googlemetricpb.MetricDescriptor_ValueType) {
-	mkind := r.Descriptor().MetricKind()
+	ikind := r.Descriptor().InstrumentKind()
 	nkind := r.Descriptor().NumberKind()
 
 	var kind googlemetricpb.MetricDescriptor_MetricKind
-	switch mkind {
+	switch ikind {
 	// TODO: Decide how UpDownCounterKind and UpDownSumObserverKind should be handled.
 	// CUMULATIVE might not be correct as it assumes the metric always goes up.
-	case apimetric.CounterKind, apimetric.UpDownCounterKind, apimetric.SumObserverKind, apimetric.UpDownSumObserverKind:
+	case metric.CounterInstrumentKind, metric.UpDownCounterInstrumentKind, metric.SumObserverInstrumentKind, metric.UpDownSumObserverInstrumentKind:
 		kind = googlemetricpb.MetricDescriptor_CUMULATIVE
-	case apimetric.ValueObserverKind, apimetric.ValueRecorderKind:
+	case metric.ValueObserverInstrumentKind, metric.ValueRecorderInstrumentKind:
 		kind = googlemetricpb.MetricDescriptor_GAUGE
 	default:
 		kind = googlemetricpb.MetricDescriptor_METRIC_KIND_UNSPECIFIED
@@ -448,9 +449,9 @@ func recordToMdpbKindType(r *export.Record) (googlemetricpb.MetricDescriptor_Met
 
 	var typ googlemetricpb.MetricDescriptor_ValueType
 	switch nkind {
-	case apimetric.Int64NumberKind:
+	case number.Int64Kind:
 		typ = googlemetricpb.MetricDescriptor_INT64
-	case apimetric.Float64NumberKind:
+	case number.Float64Kind:
 		typ = googlemetricpb.MetricDescriptor_DOUBLE
 	default:
 		typ = googlemetricpb.MetricDescriptor_VALUE_TYPE_UNSPECIFIED
@@ -493,7 +494,7 @@ func (me *metricExporter) recordToMpb(r *export.Record) *googlemetricpb.Metric {
 func (me *metricExporter) recordToTypedValueAndTimestamp(r *export.Record) (*monitoringpb.TypedValue, *monitoringpb.TimeInterval, error) {
 	agg := r.Aggregation()
 	nkind := r.Descriptor().NumberKind()
-	mkind := r.Descriptor().MetricKind()
+	ikind := r.Descriptor().InstrumentKind()
 	now := time.Now().Unix()
 
 	// TODO: Ignoring the case for Min, Max and Distribution to simply
@@ -508,13 +509,13 @@ func (me *metricExporter) recordToTypedValueAndTimestamp(r *export.Record) (*mon
 	// https://github.com/open-telemetry/opentelemetry-specification/issues/466
 	// In OpenCensus, view interface provided the bundle of name, measure, labels and aggregation in one place,
 	// and it should return the appropriate value based on the aggregation type specified there.
-	switch mkind {
-	case apimetric.ValueObserverKind, apimetric.ValueRecorderKind:
+	switch ikind {
+	case metric.ValueObserverInstrumentKind, metric.ValueRecorderInstrumentKind:
 		if lv, ok := agg.(*lastvalue.Aggregator); ok {
 			return lastValueToTypedValueAndTimestamp(lv, nkind)
 		}
 		return nil, nil, errUnsupportedAggregation{agg: agg}
-	case apimetric.CounterKind, apimetric.UpDownCounterKind, apimetric.SumObserverKind, apimetric.UpDownSumObserverKind:
+	case metric.CounterInstrumentKind, metric.UpDownCounterInstrumentKind, metric.SumObserverInstrumentKind, metric.UpDownSumObserverInstrumentKind:
 		// CUMULATIVE measurement should have the same start time and increasing end time.
 		// c.f. https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors#MetricKind
 		if sum, ok := agg.(*sum.Aggregator); ok {
@@ -523,10 +524,10 @@ func (me *metricExporter) recordToTypedValueAndTimestamp(r *export.Record) (*mon
 		return nil, nil, errUnsupportedAggregation{agg: agg}
 	}
 
-	return nil, nil, errUnexpectedMetricKind{kind: mkind}
+	return nil, nil, errUnexpectedInstrumentKind{kind: ikind}
 }
 
-func countToTypeValueAndTimestamp(count *minmaxsumcount.Aggregator, kind apimetric.NumberKind, start, end int64) (*monitoringpb.TypedValue, *monitoringpb.TimeInterval, error) {
+func countToTypeValueAndTimestamp(count *minmaxsumcount.Aggregator, kind number.Kind, start, end int64) (*monitoringpb.TypedValue, *monitoringpb.TimeInterval, error) {
 	value, err := count.Count()
 	if err != nil {
 		return nil, nil, err
@@ -541,13 +542,13 @@ func countToTypeValueAndTimestamp(count *minmaxsumcount.Aggregator, kind apimetr
 		},
 	}
 	switch kind {
-	case apimetric.Int64NumberKind:
+	case number.Int64Kind:
 		return &monitoringpb.TypedValue{
 			Value: &monitoringpb.TypedValue_Int64Value{
 				Int64Value: value,
 			},
 		}, t, nil
-	case apimetric.Float64NumberKind:
+	case number.Float64Kind:
 		return &monitoringpb.TypedValue{
 			Value: &monitoringpb.TypedValue_DoubleValue{
 				DoubleValue: float64(value),
@@ -557,7 +558,7 @@ func countToTypeValueAndTimestamp(count *minmaxsumcount.Aggregator, kind apimetr
 	return nil, nil, errUnexpectedNumberKind{kind: kind}
 }
 
-func lastValueToTypedValueAndTimestamp(lv *lastvalue.Aggregator, kind apimetric.NumberKind) (*monitoringpb.TypedValue, *monitoringpb.TimeInterval, error) {
+func lastValueToTypedValueAndTimestamp(lv *lastvalue.Aggregator, kind number.Kind) (*monitoringpb.TypedValue, *monitoringpb.TimeInterval, error) {
 	value, timestamp, err := lv.LastValue()
 	if err != nil {
 		return nil, nil, err
@@ -580,7 +581,7 @@ func lastValueToTypedValueAndTimestamp(lv *lastvalue.Aggregator, kind apimetric.
 	return tv, t, nil
 }
 
-func sumToTypedValueAndTimestamp(sum *sum.Aggregator, kind apimetric.NumberKind, start, end int64) (*monitoringpb.TypedValue, *monitoringpb.TimeInterval, error) {
+func sumToTypedValueAndTimestamp(sum *sum.Aggregator, kind number.Kind, start, end int64) (*monitoringpb.TypedValue, *monitoringpb.TimeInterval, error) {
 	value, err := sum.Sum()
 	if err != nil {
 		return nil, nil, err
@@ -602,15 +603,15 @@ func sumToTypedValueAndTimestamp(sum *sum.Aggregator, kind apimetric.NumberKind,
 	return tv, t, err
 }
 
-func aggToTypedValue(kind apimetric.NumberKind, value apimetric.Number) (*monitoringpb.TypedValue, error) {
+func aggToTypedValue(kind number.Kind, value number.Number) (*monitoringpb.TypedValue, error) {
 	switch kind {
-	case apimetric.Int64NumberKind:
+	case number.Int64Kind:
 		return &monitoringpb.TypedValue{
 			Value: &monitoringpb.TypedValue_Int64Value{
 				Int64Value: value.AsInt64(),
 			},
 		}, nil
-	case apimetric.Float64NumberKind:
+	case number.Float64Kind:
 		return &monitoringpb.TypedValue{
 			Value: &monitoringpb.TypedValue_DoubleValue{
 				DoubleValue: value.AsFloat64(),
diff --git a/exporter/metric/option.go b/exporter/metric/option.go
index e5395bc..8d12d7f 100644
--- a/exporter/metric/option.go
+++ b/exporter/metric/option.go
@@ -19,8 +19,8 @@ import (
 	"fmt"
 	"time"
 
-	apimetric "go.opentelemetry.io/otel/api/metric"
-	otel "go.opentelemetry.io/otel/sdk"
+	"go.opentelemetry.io/otel"
+	"go.opentelemetry.io/otel/metric"
 
 	apioption "google.golang.org/api/option"
 )
@@ -61,7 +61,7 @@ type options struct {
 
 	// MetricDescriptorTypeFormatter is the custom formtter for the MetricDescriptor.Type.
 	// By default, the format string is "custom.googleapis.com/opentelemetry/[metric name]".
-	MetricDescriptorTypeFormatter func(*apimetric.Descriptor) string
+	MetricDescriptorTypeFormatter func(*metric.Descriptor) string
 
 	// onError is the hook to be called when there is an error uploading the metric data.
 	// If no custom hook is set, errors are logged. Optional.
@@ -103,7 +103,7 @@ func WithInterval(t time.Duration) func(o *options) {
 // Note that the format has to follow the convention defined in the official document.
 // The default is "custom.googleapis.com/[metric name]".
 // ref. https://cloud.google.com/monitoring/custom-metrics/creating-metrics#custom_metric_names
-func WithMetricDescriptorTypeFormatter(f func(*apimetric.Descriptor) string) func(o *options) {
+func WithMetricDescriptorTypeFormatter(f func(*metric.Descriptor) string) func(o *options) {
 	return func(o *options) {
 		o.MetricDescriptorTypeFormatter = f
 	}
diff --git a/exporter/metric/selector.go b/exporter/metric/selector.go
index cf87f63..74b7967 100644
--- a/exporter/metric/selector.go
+++ b/exporter/metric/selector.go
@@ -15,7 +15,7 @@
 package metric
 
 import (
-	apimetric "go.opentelemetry.io/otel/api/metric"
+	"go.opentelemetry.io/otel/metric"
 	export "go.opentelemetry.io/otel/sdk/export/metric"
 	"go.opentelemetry.io/otel/sdk/metric/aggregator/lastvalue"
 	"go.opentelemetry.io/otel/sdk/metric/aggregator/sum"
@@ -41,9 +41,9 @@ func NewWithCloudMonitoringDistribution() export.AggregatorSelector {
 	return selectorCloudMonitoring{}
 }
 
-func (selectorCloudMonitoring) AggregatorFor(descriptor *apimetric.Descriptor, aggPtrs ...*export.Aggregator) {
-	switch descriptor.MetricKind() {
-	case apimetric.ValueObserverKind, apimetric.ValueRecorderKind:
+func (selectorCloudMonitoring) AggregatorFor(descriptor *metric.Descriptor, aggPtrs ...*export.Aggregator) {
+	switch descriptor.InstrumentKind() {
+	case metric.ValueObserverInstrumentKind, metric.ValueRecorderInstrumentKind:
 		aggs := lastvalue.New(len(aggPtrs))
 		for i := range aggPtrs {
 			*aggPtrs[i] = &aggs[i]
diff --git a/exporter/metric/version.go b/exporter/metric/version.go
index 00ba9c3..ecdde7a 100644
--- a/exporter/metric/version.go
+++ b/exporter/metric/version.go
@@ -17,5 +17,5 @@ package metric
 // Version is the current release version of the OpenTelemetry
 // Operations Metric Exporter in use.
 func Version() string {
-	return "0.13.0"
+	return "0.14.0"
 }
diff --git a/exporter/trace/README.md b/exporter/trace/README.md
index 8e470f9..3bee970 100644
--- a/exporter/trace/README.md
+++ b/exporter/trace/README.md
@@ -27,7 +27,7 @@ import (
 
     texporter "github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace"
 
-    "go.opentelemetry.io/otel/api/global"
+    "go.opentelemetry.io/otel"
     sdktrace "go.opentelemetry.io/otel/sdk/trace"
 )
 
@@ -56,7 +56,7 @@ func main() {
     defer flush()
 
     // Create custom span.
-    tracer := global.TraceProvider().Tracer("example.com/trace")
+    tracer := otel.TraceProvider().Tracer("example.com/trace")
     err = func(ctx context.Context) error {
         ctx, span := tracer.Start(ctx, "foo")
         defer span.End()
diff --git a/exporter/trace/cloudtrace.go b/exporter/trace/cloudtrace.go
index f006162..bb57443 100644
--- a/exporter/trace/cloudtrace.go
+++ b/exporter/trace/cloudtrace.go
@@ -21,15 +21,15 @@ import (
 	"log"
 	"time"
 
-	traceapi "cloud.google.com/go/trace/apiv2"
-	"golang.org/x/oauth2/google"
-	"google.golang.org/api/option"
-
-	"go.opentelemetry.io/otel/api/global"
-	apitrace "go.opentelemetry.io/otel/api/trace"
+	"go.opentelemetry.io/otel"
 	"go.opentelemetry.io/otel/label"
 	export "go.opentelemetry.io/otel/sdk/export/trace"
 	sdktrace "go.opentelemetry.io/otel/sdk/trace"
+	"go.opentelemetry.io/otel/trace"
+
+	traceapi "cloud.google.com/go/trace/apiv2"
+	"golang.org/x/oauth2/google"
+	"google.golang.org/api/option"
 )
 
 // Option is function type that is passed to the exporter initialization function.
@@ -258,18 +258,18 @@ type Exporter struct {
 }
 
 // InstallNewPipeline instantiates a NewExportPipeline and registers it globally.
-func InstallNewPipeline(opts []Option, topts ...sdktrace.TracerProviderOption) (apitrace.TracerProvider, func(), error) {
+func InstallNewPipeline(opts []Option, topts ...sdktrace.TracerProviderOption) (trace.TracerProvider, func(), error) {
 	tp, flush, err := NewExportPipeline(opts, topts...)
 	if err != nil {
 		return nil, nil, err
 	}
-	global.SetTracerProvider(tp)
+	otel.SetTracerProvider(tp)
 	return tp, flush, err
 }
 
 // NewExportPipeline sets up a complete export pipeline with the recommended setup
 // for trace provider. Returns provider, flush function, and errors.
-func NewExportPipeline(opts []Option, topts ...sdktrace.TracerProviderOption) (apitrace.TracerProvider, func(), error) {
+func NewExportPipeline(opts []Option, topts ...sdktrace.TracerProviderOption) (trace.TracerProvider, func(), error) {
 	exporter, err := NewExporter(opts...)
 	if err != nil {
 		return nil, nil, err
diff --git a/exporter/trace/go.mod b/exporter/trace/go.mod
index 8980526..e6bf767 100644
--- a/exporter/trace/go.mod
+++ b/exporter/trace/go.mod
@@ -7,8 +7,8 @@ require (
 	github.com/golang/protobuf v1.4.2
 	github.com/googleinterns/cloud-operations-api-mock v0.0.0-20200709193332-a1e58c29bdd3
 	github.com/stretchr/testify v1.6.1
-	go.opentelemetry.io/otel v0.13.0
-	go.opentelemetry.io/otel/sdk v0.13.0
+	go.opentelemetry.io/otel v0.14.0
+	go.opentelemetry.io/otel/sdk v0.14.0
 	golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
 	google.golang.org/api v0.29.0
 	google.golang.org/genproto v0.0.0-20200715011427-11fb19a81f2c
diff --git a/exporter/trace/go.sum b/exporter/trace/go.sum
index 942b2c2..053a520 100644
--- a/exporter/trace/go.sum
+++ b/exporter/trace/go.sum
@@ -85,8 +85,8 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
 github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
 github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
-github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo=
+github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
 github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
 github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
@@ -131,10 +131,10 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
 go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
 go.opencensus.io v0.22.4 h1:LYy1Hy3MJdrCdMwwzxA/dRok4ejH+RwNGbuoD9fCjto=
 go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
-go.opentelemetry.io/otel v0.13.0 h1:2isEnyzjjJZq6r2EKMsFj4TxiQiexsM04AVhwbR/oBA=
-go.opentelemetry.io/otel v0.13.0/go.mod h1:dlSNewoRYikTkotEnxdmuBHgzT+k/idJSfDv/FxEnOY=
-go.opentelemetry.io/otel/sdk v0.13.0 h1:4VCfpKamZ8GtnepXxMRurSpHpMKkcxhtO33z1S4rGDQ=
-go.opentelemetry.io/otel/sdk v0.13.0/go.mod h1:dKvLH8Uu8LcEPlSAUsfW7kMGaJBhk/1NYvpPZ6wIMbU=
+go.opentelemetry.io/otel v0.14.0 h1:YFBEfjCk9MTjaytCNSUkp9Q8lF7QJezA06T71FbQxLQ=
+go.opentelemetry.io/otel v0.14.0/go.mod h1:vH5xEuwy7Rts0GNtsCW3HYQoZDY+OmBJ6t1bFGGlxgw=
+go.opentelemetry.io/otel/sdk v0.14.0 h1:Pqgd85y5XhyvHQlOxkKW+FD4DAX7AoeaNIDKC2VhfHQ=
+go.opentelemetry.io/otel/sdk v0.14.0/go.mod h1:kGO5pEMSNqSJppHAm8b73zztLxB5fgDQnD56/dl5xqE=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
 golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
diff --git a/exporter/trace/trace.go b/exporter/trace/trace.go
index 60f26c0..055d632 100644
--- a/exporter/trace/trace.go
+++ b/exporter/trace/trace.go
@@ -22,12 +22,12 @@ import (
 	"sync"
 	"time"
 
+	export "go.opentelemetry.io/otel/sdk/export/trace"
+
 	traceclient "cloud.google.com/go/trace/apiv2"
 	"google.golang.org/api/support/bundler"
 	tracepb "google.golang.org/genproto/googleapis/devtools/cloudtrace/v2"
 	"google.golang.org/protobuf/proto"
-
-	export "go.opentelemetry.io/otel/sdk/export/trace"
 )
 
 // traceExporter is an implementation of trace.Exporter and trace.BatchExporter
diff --git a/exporter/trace/trace_proto.go b/exporter/trace/trace_proto.go
index f49e6b3..d1f4a77 100644
--- a/exporter/trace/trace_proto.go
+++ b/exporter/trace/trace_proto.go
@@ -21,15 +21,15 @@ import (
 	"time"
 	"unicode/utf8"
 
+	"go.opentelemetry.io/otel"
+	"go.opentelemetry.io/otel/codes"
+	"go.opentelemetry.io/otel/label"
+	export "go.opentelemetry.io/otel/sdk/export/trace"
+
 	timestamppb "github.com/golang/protobuf/ptypes/timestamp"
 	wrapperspb "github.com/golang/protobuf/ptypes/wrappers"
-	"go.opentelemetry.io/otel/codes"
 	tracepb "google.golang.org/genproto/googleapis/devtools/cloudtrace/v2"
 	statuspb "google.golang.org/genproto/googleapis/rpc/status"
-
-	"go.opentelemetry.io/otel/label"
-	opentelemetry "go.opentelemetry.io/otel/sdk"
-	export "go.opentelemetry.io/otel/sdk/export/trace"
 )
 
 const (
@@ -55,7 +55,7 @@ const (
 	labelHTTPUserAgent  = `/http/user_agent`
 )
 
-var userAgent = fmt.Sprintf("opentelemetry-go %s; google-cloud-trace-exporter %s", opentelemetry.Version(), Version())
+var userAgent = fmt.Sprintf("opentelemetry-go %s; google-cloud-trace-exporter %s", otel.Version(), Version())
 
 func generateDisplayName(s *export.SpanData, format DisplayNameFormatter) string {
 	if format != nil {
diff --git a/exporter/trace/version.go b/exporter/trace/version.go
index e1f0203..3a71e27 100644
--- a/exporter/trace/version.go
+++ b/exporter/trace/version.go
@@ -17,5 +17,5 @@ package trace
 // Version is the current release version of the OpenTelemetry
 // Operations Trace Exporter in use.
 func Version() string {
-	return "0.13.0"
+	return "0.14.0"
 }


Test patch:
diff --git a/exporter/metric/metric_test.go b/exporter/metric/metric_test.go
index d8de759..5d11558 100644
--- a/exporter/metric/metric_test.go
+++ b/exporter/metric/metric_test.go
@@ -20,11 +20,9 @@ import (
 	"reflect"
 	"testing"
 
-	"github.com/googleinterns/cloud-operations-api-mock/cloudmock"
-	"github.com/stretchr/testify/assert"
-	"go.opentelemetry.io/otel/api/metric"
-	apimetric "go.opentelemetry.io/otel/api/metric"
 	"go.opentelemetry.io/otel/label"
+	"go.opentelemetry.io/otel/metric"
+	"go.opentelemetry.io/otel/metric/number"
 	export "go.opentelemetry.io/otel/sdk/export/metric"
 	"go.opentelemetry.io/otel/sdk/export/metric/metrictest"
 	aggtest "go.opentelemetry.io/otel/sdk/metric/aggregator/aggregatortest"
@@ -32,12 +30,14 @@ import (
 	"go.opentelemetry.io/otel/sdk/metric/controller/push"
 	"go.opentelemetry.io/otel/sdk/resource"
 
+	"github.com/googleinterns/cloud-operations-api-mock/cloudmock"
+	"github.com/stretchr/testify/assert"
 	"google.golang.org/api/option"
 	googlemetricpb "google.golang.org/genproto/googleapis/api/metric"
 )
 
 var (
-	formatter = func(d *apimetric.Descriptor) string {
+	formatter = func(d *metric.Descriptor) string {
 		return fmt.Sprintf("test.googleapis.com/%s", d.Name())
 	}
 )
@@ -50,11 +50,11 @@ func TestExportMetrics(t *testing.T) {
 	res := &resource.Resource{}
 	cps := metrictest.NewCheckpointSet(res)
 	ctx := context.Background()
-	desc := apimetric.NewDescriptor("testing", apimetric.ValueRecorderKind, apimetric.Float64NumberKind)
+	desc := metric.NewDescriptor("testing", metric.ValueRecorderInstrumentKind, number.Float64Kind)
 
 	lvagg := &lastvalue.New(1)[0]
-	aggtest.CheckedUpdate(t, lvagg, metric.NewFloat64Number(12.34), &desc)
-	lvagg.Update(ctx, metric.NewFloat64Number(12.34), &desc)
+	aggtest.CheckedUpdate(t, lvagg, number.NewFloat64Number(12.34), &desc)
+	lvagg.Update(ctx, number.NewFloat64Number(12.34), &desc)
 	cps.Add(&desc, lvagg, label.String("a", "A"), label.String("b", "B"))
 
 	opts := []Option{
@@ -79,7 +79,7 @@ func TestExportCounter(t *testing.T) {
 	clientOpt := option.WithGRPCConn(cloudMock.ClientConn())
 
 	resOpt := push.WithResource(
-		resource.New(
+		resource.NewWithAttributes(
 			label.String("test_id", "abc123"),
 		),
 	)
@@ -118,9 +118,9 @@ func TestDescToMetricType(t *testing.T) {
 		},
 	}
 
-	inDesc := []apimetric.Descriptor{
-		apimetric.NewDescriptor("testing", apimetric.ValueRecorderKind, apimetric.Float64NumberKind),
-		apimetric.NewDescriptor("test/of/path", apimetric.ValueRecorderKind, apimetric.Float64NumberKind),
+	inDesc := []metric.Descriptor{
+		metric.NewDescriptor("testing", metric.ValueRecorderInstrumentKind, number.Float64Kind),
+		metric.NewDescriptor("test/of/path", metric.ValueRecorderInstrumentKind, number.Float64Kind),
 	}
 
 	wants := []string{
@@ -141,10 +141,10 @@ func TestRecordToMpb(t *testing.T) {
 	cps := metrictest.NewCheckpointSet(res)
 	ctx := context.Background()
 
-	desc := apimetric.NewDescriptor("testing", apimetric.ValueRecorderKind, apimetric.Float64NumberKind)
+	desc := metric.NewDescriptor("testing", metric.ValueRecorderInstrumentKind, number.Float64Kind)
 
 	lvagg := &lastvalue.New(1)[0]
-	aggtest.CheckedUpdate(t, lvagg, metric.NewFloat64Number(12.34), &desc)
+	aggtest.CheckedUpdate(t, lvagg, number.NewFloat64Number(12.34), &desc)
 	err := lvagg.Update(ctx, 1, &desc)
 	if err != nil {
 		t.Errorf("%v", err)
@@ -178,7 +178,7 @@ func TestRecordToMpb(t *testing.T) {
 		},
 	}
 
-	aggError := cps.ForEach(export.CumulativeExporter, func(r export.Record) error {
+	aggError := cps.ForEach(export.CumulativeExportKindSelector(), func(r export.Record) error {
 		out := me.recordToMpb(&r)
 		if !reflect.DeepEqual(want, out) {
 			return fmt.Errorf("expected: %v, actual: %v", want, out)
@@ -198,7 +198,7 @@ func TestResourceToMonitoredResourcepb(t *testing.T) {
 	}{
 		// k8s_container
 		{
-			resource.New(
+			resource.NewWithAttributes(
 				label.String("cloud.provider", "gcp"),
 				label.String("cloud.zone", "us-central1-a"),
 				label.String("k8s.cluster.name", "opentelemetry-cluster"),
@@ -218,7 +218,7 @@ func TestResourceToMonitoredResourcepb(t *testing.T) {
 		},
 		// k8s_node
 		{
-			resource.New(
+			resource.NewWithAttributes(
 				label.String("cloud.provider", "gcp"),
 				label.String("cloud.zone", "us-central1-a"),
 				label.String("k8s.cluster.name", "opentelemetry-cluster"),
@@ -234,7 +234,7 @@ func TestResourceToMonitoredResourcepb(t *testing.T) {
 		},
 		// k8s_pod
 		{
-			resource.New(
+			resource.NewWithAttributes(
 				label.String("cloud.provider", "gcp"),
 				label.String("cloud.zone", "us-central1-a"),
 				label.String("k8s.cluster.name", "opentelemetry-cluster"),
@@ -252,7 +252,7 @@ func TestResourceToMonitoredResourcepb(t *testing.T) {
 		},
 		// k8s_cluster
 		{
-			resource.New(
+			resource.NewWithAttributes(
 				label.String("cloud.provider", "gcp"),
 				label.String("cloud.zone", "us-central1-a"),
 				label.String("k8s.cluster.name", "opentelemetry-cluster"),
@@ -266,7 +266,7 @@ func TestResourceToMonitoredResourcepb(t *testing.T) {
 		},
 		// k8s_node missing a field
 		{
-			resource.New(
+			resource.NewWithAttributes(
 				label.String("cloud.provider", "gcp"),
 				label.String("k8s.cluster.name", "opentelemetry-cluster"),
 				label.String("host.name", "opentelemetry-node"),
@@ -278,7 +278,7 @@ func TestResourceToMonitoredResourcepb(t *testing.T) {
 		},
 		// nonexisting resource types
 		{
-			resource.New(
+			resource.NewWithAttributes(
 				label.String("cloud.provider", "none"),
 				label.String("cloud.zone", "us-central1-a"),
 				label.String("k8s.cluster.name", "opentelemetry-cluster"),
@@ -293,7 +293,7 @@ func TestResourceToMonitoredResourcepb(t *testing.T) {
 		},
 		// GCE resource fields
 		{
-			resource.New(
+			resource.NewWithAttributes(
 				label.String("cloud.provider", "gcp"),
 				label.String("host.id", "123"),
 				label.String("cloud.zone", "us-central1-a"),
@@ -307,7 +307,7 @@ func TestResourceToMonitoredResourcepb(t *testing.T) {
 		},
 		// AWS resources
 		{
-			resource.New(
+			resource.NewWithAttributes(
 				label.String("cloud.provider", "aws"),
 				label.String("cloud.region", "us-central1-a"),
 				label.String("host.id", "123"),
@@ -323,7 +323,7 @@ func TestResourceToMonitoredResourcepb(t *testing.T) {
 		},
 	}
 
-	desc := apimetric.NewDescriptor("testing", apimetric.ValueRecorderKind, apimetric.Float64NumberKind)
+	desc := metric.NewDescriptor("testing", metric.ValueRecorderInstrumentKind, number.Float64Kind)
 
 	md := &googlemetricpb.MetricDescriptor{
 		Name:        desc.Name(),
diff --git a/exporter/trace/cloudtrace_test.go b/exporter/trace/cloudtrace_test.go
index 44ae6f1..2afc84b 100644
--- a/exporter/trace/cloudtrace_test.go
+++ b/exporter/trace/cloudtrace_test.go
@@ -23,15 +23,13 @@ import (
 	"testing"
 	"time"
 
+	"go.opentelemetry.io/otel"
 	"go.opentelemetry.io/otel/codes"
-
-	"github.com/googleinterns/cloud-operations-api-mock/cloudmock"
-	"github.com/stretchr/testify/assert"
-
-	"go.opentelemetry.io/otel/api/global"
 	export "go.opentelemetry.io/otel/sdk/export/trace"
 	sdktrace "go.opentelemetry.io/otel/sdk/trace"
 
+	"github.com/googleinterns/cloud-operations-api-mock/cloudmock"
+	"github.com/stretchr/testify/assert"
 	"google.golang.org/api/option"
 	tracepb "google.golang.org/genproto/googleapis/devtools/cloudtrace/v2"
 )
@@ -54,12 +52,12 @@ func TestExporter_ExportSpan(t *testing.T) {
 	)
 	assert.NoError(t, err)
 
-	_, span := global.TracerProvider().Tracer("test-tracer").Start(context.Background(), "test-span")
+	_, span := otel.Tracer("test-tracer").Start(context.Background(), "test-span")
 	span.SetStatus(codes.Ok, "Status Message")
 	span.End()
 	assert.True(t, span.SpanContext().IsValid())
 
-	_, span = global.TracerProvider().Tracer("test-tracer").Start(context.Background(), "test-span-with-error-status")
+	_, span = otel.Tracer("test-tracer").Start(context.Background(), "test-span-with-error-status")
 	span.SetStatus(codes.Error, "Error Message")
 	span.End()
 
@@ -93,7 +91,7 @@ func TestExporter_DisplayNameFormatter(t *testing.T) {
 	)
 	assert.NoError(t, err)
 
-	_, span := global.TracerProvider().Tracer("test-tracer").Start(context.Background(), spanName)
+	_, span := otel.Tracer("test-tracer").Start(context.Background(), spanName)
 	span.End()
 	assert.True(t, span.SpanContext().IsValid())
 
@@ -127,7 +125,7 @@ func TestExporter_Timeout(t *testing.T) {
 	)
 	assert.NoError(t, err)
 
-	_, span := global.TracerProvider().Tracer("test-tracer").Start(context.Background(), "test-span")
+	_, span := otel.Tracer("test-tracer").Start(context.Background(), "test-span")
 	span.End()
 	assert.True(t, span.SpanContext().IsValid())
 
@@ -165,7 +163,7 @@ func TestBundling(t *testing.T) {
 	assert.NoError(t, err)
 
 	for i := 0; i < 35; i++ {
-		_, span := global.TracerProvider().Tracer("test-tracer").Start(context.Background(), "test-span")
+		_, span := otel.Tracer("test-tracer").Start(context.Background(), "test-span")
 		span.End()
 	}
 
@@ -232,7 +230,7 @@ func TestBundling_ConcurrentExports(t *testing.T) {
 	go func() {
 		// Release enough spans to form two bundles
 		for i := 0; i < totalSpans; i++ {
-			_, span := global.TracerProvider().Tracer("test-tracer").Start(context.Background(), "test-span")
+			_, span := otel.Tracer("test-tracer").Start(context.Background(), "test-span")
 			expectedSpanIDs = append(expectedSpanIDs, span.SpanContext().SpanID.String())
 			span.End()
 		}
@@ -286,7 +284,7 @@ func TestBundling_Oversized(t *testing.T) {
 		sdktrace.WithConfig(sdktrace.Config{DefaultSampler: sdktrace.AlwaysSample()}),
 		sdktrace.WithSyncer(exp),
 	)
-	global.SetTracerProvider(tp)
+	otel.SetTracerProvider(tp)
 
 	buf := &logBuffer{logInputChan: make(chan []byte, 100)}
 	log.SetOutput(buf)
@@ -296,7 +294,7 @@ func TestBundling_Oversized(t *testing.T) {
 
 	go func() {
 		for i := 0; i < 10; i++ {
-			_, span := global.TracerProvider().Tracer("test-tracer").Start(context.Background(), "test-span")
+			_, span := otel.Tracer("test-tracer").Start(context.Background(), "test-span")
 			span.SetName("a")
 			span.End()
 		}
diff --git a/exporter/trace/trace_proto_test.go b/exporter/trace/trace_proto_test.go
index 18c972b..5e0483d 100644
--- a/exporter/trace/trace_proto_test.go
+++ b/exporter/trace/trace_proto_test.go
@@ -17,10 +17,9 @@ package trace
 import (
 	"testing"
 
+	"go.opentelemetry.io/otel/label"
 	export "go.opentelemetry.io/otel/sdk/export/trace"
 	"go.opentelemetry.io/otel/sdk/resource"
-
-	"go.opentelemetry.io/otel/label"
 )
 
 func TestInjectLabelsFromResources(t *testing.T) {
@@ -32,13 +31,13 @@ func TestInjectLabelsFromResources(t *testing.T) {
 		{
 			name: "empty resource",
 			input: export.SpanData{
-				Resource: resource.New(),
+				Resource: resource.NewWithAttributes(),
 				Attributes: []label.KeyValue{
 					label.String("a", "1"),
 				},
 			},
 			expected: export.SpanData{
-				Resource: resource.New(),
+				Resource: resource.NewWithAttributes(),
 				Attributes: []label.KeyValue{
 					label.String("a", "1"),
 				},
@@ -47,11 +46,15 @@ func TestInjectLabelsFromResources(t *testing.T) {
 		{
 			name: "empty attributes",
 			input: export.SpanData{
-				Resource:   resource.New(label.String("b", "2")),
+				Resource: resource.NewWithAttributes(
+					label.String("b", "2"),
+				),
 				Attributes: []label.KeyValue{},
 			},
 			expected: export.SpanData{
-				Resource: resource.New(label.String("b", "2")),
+				Resource: resource.NewWithAttributes(
+					label.String("b", "2"),
+				),
 				Attributes: []label.KeyValue{
 					label.String("b", "2"),
 				},
@@ -60,13 +63,17 @@ func TestInjectLabelsFromResources(t *testing.T) {
 		{
 			name: "normal insert",
 			input: export.SpanData{
-				Resource: resource.New(label.String("b", "2")),
+				Resource: resource.NewWithAttributes(
+					label.String("b", "2"),
+				),
 				Attributes: []label.KeyValue{
 					label.String("a", "1"),
 				},
 			},
 			expected: export.SpanData{
-				Resource: resource.New(label.String("b", "2")),
+				Resource: resource.NewWithAttributes(
+					label.String("b", "2"),
+				),
 				Attributes: []label.KeyValue{
 					label.String("a", "1"),
 					label.String("b", "2"),
@@ -76,13 +83,17 @@ func TestInjectLabelsFromResources(t *testing.T) {
 		{
 			name: "conflicts with the existing keys",
 			input: export.SpanData{
-				Resource: resource.New(label.String("a", "2")),
+				Resource: resource.NewWithAttributes(
+					label.String("a", "2"),
+				),
 				Attributes: []label.KeyValue{
 					label.String("a", "1"),
 				},
 			},
 			expected: export.SpanData{
-				Resource: resource.New(label.String("a", "2")),
+				Resource: resource.NewWithAttributes(
+					label.String("a", "2"),
+				),
 				Attributes: []label.KeyValue{
 					label.String("a", "1"),
 				},
@@ -91,7 +102,7 @@ func TestInjectLabelsFromResources(t *testing.T) {
 		{
 			name: "allowed duplicate keys in attributes",
 			input: export.SpanData{
-				Resource: resource.New(
+				Resource: resource.NewWithAttributes(
 					label.String("c", "1"),
 				),
 				Attributes: []label.KeyValue{
@@ -102,7 +113,9 @@ func TestInjectLabelsFromResources(t *testing.T) {
 				},
 			},
 			expected: export.SpanData{
-				Resource: resource.New(label.String("c", "1")),
+				Resource: resource.NewWithAttributes(
+					label.String("c", "1"),
+				),
 				Attributes: []label.KeyValue{
 					label.String("a", "1"),
 					label.String("b", "1"),