Repository: lightstep/otel-launcher-go
Pull request #596 (2024-01-05 18:04:52)

Fewer dependencies, test cleanup
**Description:** 

Removes several unused-by-default metric dependencies which have been disabled in the default configuration for many releases. The LS metrics SDK is now used by default, and the former "prestable" automatic metric instrumentation is no longer included. The LS instrumentation packages are always used.

codecov-commenter: ## [Codecov](https://app.codecov.io/gh/lightstep/otel-launcher-go/pull/596?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lightstep) Report
Attention: `5 lines` in your changes are missing coverage. Please review.
> Comparison is base [(`3b55ac7`)](https://app.codecov.io/gh/lightstep/otel-launcher-go/commit/3b55ac7617a083fa9676f256264e77b1b7233487?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lightstep) 89.60% compared to head [(`b29da6f`)](https://app.codecov.io/gh/lightstep/otel-launcher-go/pull/596?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lightstep) 89.49%.

> :exclamation: Current head b29da6f differs from pull request most recent head 1fed50d. Consider uploading reports for the commit 1fed50d to get more accurate results

| [Files](https://app.codecov.io/gh/lightstep/otel-launcher-go/pull/596?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lightstep) | Patch % | Lines |
|---|---|---|
| [pipelines/metrics.go](https://app.codecov.io/gh/lightstep/otel-launcher-go/pull/596?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lightstep#diff-cGlwZWxpbmVzL21ldHJpY3MuZ28=) | 82.35% | [2 Missing and 1 partial :warning: ](https://app.codecov.io/gh/lightstep/otel-launcher-go/pull/596?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lightstep) |
| [pipelines/common.go](https://app.codecov.io/gh/lightstep/otel-launcher-go/pull/596?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lightstep#diff-cGlwZWxpbmVzL2NvbW1vbi5nbw==) | 60.00% | [2 Missing :warning: ](https://app.codecov.io/gh/lightstep/otel-launcher-go/pull/596?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lightstep) |

<details><summary>Additional details and impacted files</summary>


```diff
@@            Coverage Diff             @@
##             main     #596      +/-   ##
==========================================
- Coverage   89.60%   89.49%   -0.12%     
==========================================
  Files          62       62              
  Lines        3686     3635      -51     
==========================================
- Hits         3303     3253      -50     
- Misses        285      287       +2     
+ Partials       98       95       -3     
```



</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/lightstep/otel-launcher-go/pull/596?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lightstep).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lightstep).


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index abe3acd..ea9b84d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
 
 ## Unreleased
 
+- Trace exporter: always use LS instrumentation packages and OTel Collector export path, remove dependency on OTel-Go OTLP trace exporter. [#595](https://github.com/lightstep/otel-launcher-go/pull/595)
+- Metric exporter: always use LS metrics SDK and OTel Collector export path, remove dependency on OTel-Go OTLP metric exporter and OTel-Go-Contrib metric instrumentation. [#596](https://github.com/lightstep/otel-launcher-go/pull/596)
 - Add "lowmemory" temporality naming, leaving "stateless" as an alias. [#597](https://github.com/lightstep/otel-launcher-go/pull/597)
 
 ## [1.23.0](https://github.com/lightstep/otel-launcher-go/releases/tag/v1.23.0) - 2023-12-20)
diff --git a/go.mod b/go.mod
index d5502db..aa17e35 100644
--- a/go.mod
+++ b/go.mod
@@ -3,7 +3,6 @@ module github.com/lightstep/otel-launcher-go
 go 1.21
 
 require (
-	github.com/lightstep/otel-launcher-go/lightstep/sdk/metric v1.23.0
 	github.com/lightstep/otel-launcher-go/pipelines v1.23.0
 	github.com/sethvargo/go-envconfig v0.8.3
 	github.com/stretchr/testify v1.8.4
@@ -45,6 +44,7 @@ require (
 	github.com/lightstep/go-expohisto v1.0.0 // indirect
 	github.com/lightstep/otel-launcher-go/lightstep/instrumentation v1.23.0 // indirect
 	github.com/lightstep/otel-launcher-go/lightstep/sdk/internal v1.23.0 // indirect
+	github.com/lightstep/otel-launcher-go/lightstep/sdk/metric v1.23.0 // indirect
 	github.com/lightstep/otel-launcher-go/lightstep/sdk/trace v1.23.0 // indirect
 	github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
 	github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 // indirect
@@ -90,12 +90,8 @@ require (
 	go.opentelemetry.io/collector/processor v0.90.0 // indirect
 	go.opentelemetry.io/collector/receiver v0.90.0 // indirect
 	go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect
-	go.opentelemetry.io/contrib/instrumentation/host v0.45.0 // indirect
-	go.opentelemetry.io/contrib/instrumentation/runtime v0.45.0 // indirect
 	go.opentelemetry.io/contrib/propagators/b3 v1.21.1 // indirect
 	go.opentelemetry.io/contrib/propagators/ot v1.20.0 // indirect
-	go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.44.0 // indirect
-	go.opentelemetry.io/otel/sdk/metric v1.21.0 // indirect
 	go.opentelemetry.io/proto/otlp v1.0.0 // indirect
 	go.uber.org/multierr v1.11.0 // indirect
 	go.uber.org/zap v1.26.0 // indirect
diff --git a/go.sum b/go.sum
index 60d6472..7b6ba9f 100644
--- a/go.sum
+++ b/go.sum
@@ -948,18 +948,12 @@ go.opentelemetry.io/contrib/config v0.1.1 h1:lIUTrMWkfDE0GvzBLhwv6ATDB1vntrnTsRv
 go.opentelemetry.io/contrib/config v0.1.1/go.mod h1:rDrK4+PS6Cs+WIphU/GO5Sk4TGV36lEQqk/Z1vZkaLI=
 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M=
 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0/go.mod h1:Ct6zzQEuGK3WpJs2n4dn+wfJYzd/+hNnxMRTWjGn30M=
-go.opentelemetry.io/contrib/instrumentation/host v0.45.0 h1:1uzNKJDqZ6y6F5J6aKWgJjRREpKiGhBvKHlWon/bqB4=
-go.opentelemetry.io/contrib/instrumentation/host v0.45.0/go.mod h1:vlqPvzDsmB4+jlERxBRXsdLCD6Q0LoBzxHqNXp3qvG4=
-go.opentelemetry.io/contrib/instrumentation/runtime v0.45.0 h1:2JydY5UiDpqvj2p7sO9bgHuhTy4hgTZ0ymehdq/Ob0Q=
-go.opentelemetry.io/contrib/instrumentation/runtime v0.45.0/go.mod h1:ch3a5QxOqVWxas4CzjCFFOOQe+7HgAXC/N1oVxS9DK4=
 go.opentelemetry.io/contrib/propagators/b3 v1.21.1 h1:WPYiUgmw3+b7b3sQ1bFBFAf0q+Di9dvNc3AtYfnT4RQ=
 go.opentelemetry.io/contrib/propagators/b3 v1.21.1/go.mod h1:EmzokPoSqsYMBVK4nRnhsfm5mbn8J1eDuz/U1UaQaWg=
 go.opentelemetry.io/contrib/propagators/ot v1.20.0 h1:duH7mgL6VGQH7e7QEAVOFkCQXWpCb4PjTtrhdrYrJRQ=
 go.opentelemetry.io/contrib/propagators/ot v1.20.0/go.mod h1:gijQzxOq0JLj9lyZhTvqjDddGV/zaNagpPIn+2r8CEI=
 go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc=
 go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo=
-go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.44.0 h1:jd0+5t/YynESZqsSyPz+7PAFdEop0dlN0+PkyHYo8oI=
-go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.44.0/go.mod h1:U707O40ee1FpQGyhvqnzmCJm1Wh6OX6GGBVn0E6Uyyk=
 go.opentelemetry.io/otel/exporters/prometheus v0.44.0 h1:08qeJgaPC0YEBu2PQMbqU3rogTlyzpjhCI2b58Yn00w=
 go.opentelemetry.io/otel/exporters/prometheus v0.44.0/go.mod h1:ERL2uIeBtg4TxZdojHUwzZfIFlUIjZtxubT5p4h1Gjg=
 go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4=
diff --git a/launcher/config.go b/launcher/config.go
index 8facf0c..c19ff12 100644
--- a/launcher/config.go
+++ b/launcher/config.go
@@ -184,12 +184,10 @@ func WithLogger(logger Logger) Option {
 	}
 }
 
-// WithLightstepMetricsSDK enables the Lightstep metrics SDK from this
-// repository.
+// WithLightstepMetricsSDK is a no-op.  The Lightstep Metrics SDK is
+// always used.
 func WithLightstepMetricsSDK(alt bool) Option {
-	return func(c *Config) {
-		c.UseLightstepMetricsSDK = alt
-	}
+	return func(c *Config) {}
 }
 
 type DefaultLogger struct {
@@ -235,7 +233,6 @@ type Config struct {
 	LogLevel                            string            `env:"OTEL_LOG_LEVEL,default=info"`
 	Propagators                         []string          `env:"OTEL_PROPAGATORS,default=b3"`
 	MetricReportingPeriod               string            `env:"OTEL_EXPORTER_OTLP_METRIC_PERIOD,default=30s"`
-	UseLightstepMetricsSDK              bool              `env:"LS_METRICS_SDK,default=true"`
 	ResourceAttributes                  map[string]string
 	Resource                            *resource.Resource
 	logger                              Logger
@@ -403,7 +400,6 @@ func setupMetrics(c Config) (func() error, error) {
 		TemporalityPreference:   c.MetricExporterTemporalityPreference,
 		MetricsBuiltinsEnabled:  c.MetricsBuiltinsEnabled,
 		MetricsBuiltinLibraries: c.MetricsBuiltinLibraries,
-		UseLightstepMetricsSDK:  c.UseLightstepMetricsSDK,
 	})
 }
 
diff --git a/pipelines/common.go b/pipelines/common.go
index 26efc7b..46bde51 100644
--- a/pipelines/common.go
+++ b/pipelines/common.go
@@ -19,7 +19,6 @@ import (
 	otelcoltrace "github.com/lightstep/otel-launcher-go/lightstep/sdk/trace/exporters/otlp/otelcol"
 
 	"go.opentelemetry.io/collector/config/configtls"
-	oldotlpmetricgrpc "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc"
 	"go.opentelemetry.io/otel/sdk/resource"
 	"google.golang.org/grpc/credentials"
 )
@@ -55,38 +54,33 @@ type PipelineConfig struct {
 	// TemporalityPreference is one of "cumulative", "delta", or "lowmemory" (a.k.a. "stateless")
 	TemporalityPreference string
 
-	// Credentials carries the TLS settings.
-	Credentials credentials.TransportCredentials
 	// TLSSetting is the newer form.
 	TLSSetting *configtls.TLSClientSetting
 
-	// UseLightstepMetricsSDK determines whether to use the metrics
-	// SDK at ../lightstep/sdk/metric.
-	UseLightstepMetricsSDK bool
+	// The Lightstep SDK is always used, the OTel-Go SDK is no longer
+	// an option supported by this library.
+	DeprecatedUseLightstepMetricsSDK bool
+	// Credentials carries the TLS settings used by OTel-Go SDKs.
+	// This is not used.
+	DeprecatedCredentials credentials.TransportCredentials
 }
 
 type PipelineSetupFunc func(PipelineConfig) (func() error, error)
 
-func (p PipelineConfig) secureMetricOption() (otelcolmetric.Option, oldotlpmetricgrpc.Option) {
+func (p PipelineConfig) secureMetricOption() otelcolmetric.Option {
 	if p.Insecure {
-		return otelcolmetric.WithInsecure(), oldotlpmetricgrpc.WithInsecure()
-	} else if p.Credentials != nil {
-		return nil, oldotlpmetricgrpc.WithTLSCredentials(p.Credentials)
+		return otelcolmetric.WithInsecure()
 	} else if p.TLSSetting != nil {
-		return otelcolmetric.WithTLSSetting(*p.TLSSetting), nil
+		return otelcolmetric.WithTLSSetting(*p.TLSSetting)
 	}
 	return otelcolmetric.WithTLSSetting(configtls.TLSClientSetting{
-			Insecure: false,
-		}), oldotlpmetricgrpc.WithTLSCredentials(
-			credentials.NewClientTLSFromCert(nil, ""),
-		)
+		Insecure: false,
+	})
 }
 
 func (p PipelineConfig) secureTraceOption() otelcoltrace.Option {
 	if p.Insecure {
 		return otelcoltrace.WithInsecure()
-	} else if p.Credentials != nil {
-		return nil
 	} else if p.TLSSetting != nil {
 		return otelcoltrace.WithTLSSetting(*p.TLSSetting)
 	}
diff --git a/pipelines/go.mod b/pipelines/go.mod
index 24531f9..43f83c7 100644
--- a/pipelines/go.mod
+++ b/pipelines/go.mod
@@ -10,18 +10,12 @@ require (
 	// For otelcol-based exporter configuration.
 	go.opentelemetry.io/collector/config/configtls v0.90.0
 
-	// Host and runtime instrumentation
-	go.opentelemetry.io/contrib/instrumentation/host v0.45.0
-	go.opentelemetry.io/contrib/instrumentation/runtime v0.45.0
-
 	// b3 and opentracing propagators
 	go.opentelemetry.io/contrib/propagators/b3 v1.21.1
 	go.opentelemetry.io/contrib/propagators/ot v1.20.0
 	go.opentelemetry.io/otel v1.21.0
-	go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.44.0
 	go.opentelemetry.io/otel/metric v1.21.0
 	go.opentelemetry.io/otel/sdk v1.21.0
-	go.opentelemetry.io/otel/sdk/metric v1.21.0
 
 	// gRPC
 	google.golang.org/grpc v1.59.0
diff --git a/pipelines/go.sum b/pipelines/go.sum
index 7d950d0..cb21418 100644
--- a/pipelines/go.sum
+++ b/pipelines/go.sum
@@ -946,18 +946,12 @@ go.opentelemetry.io/contrib/config v0.1.1 h1:lIUTrMWkfDE0GvzBLhwv6ATDB1vntrnTsRv
 go.opentelemetry.io/contrib/config v0.1.1/go.mod h1:rDrK4+PS6Cs+WIphU/GO5Sk4TGV36lEQqk/Z1vZkaLI=
 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M=
 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0/go.mod h1:Ct6zzQEuGK3WpJs2n4dn+wfJYzd/+hNnxMRTWjGn30M=
-go.opentelemetry.io/contrib/instrumentation/host v0.45.0 h1:1uzNKJDqZ6y6F5J6aKWgJjRREpKiGhBvKHlWon/bqB4=
-go.opentelemetry.io/contrib/instrumentation/host v0.45.0/go.mod h1:vlqPvzDsmB4+jlERxBRXsdLCD6Q0LoBzxHqNXp3qvG4=
-go.opentelemetry.io/contrib/instrumentation/runtime v0.45.0 h1:2JydY5UiDpqvj2p7sO9bgHuhTy4hgTZ0ymehdq/Ob0Q=
-go.opentelemetry.io/contrib/instrumentation/runtime v0.45.0/go.mod h1:ch3a5QxOqVWxas4CzjCFFOOQe+7HgAXC/N1oVxS9DK4=
 go.opentelemetry.io/contrib/propagators/b3 v1.21.1 h1:WPYiUgmw3+b7b3sQ1bFBFAf0q+Di9dvNc3AtYfnT4RQ=
 go.opentelemetry.io/contrib/propagators/b3 v1.21.1/go.mod h1:EmzokPoSqsYMBVK4nRnhsfm5mbn8J1eDuz/U1UaQaWg=
 go.opentelemetry.io/contrib/propagators/ot v1.20.0 h1:duH7mgL6VGQH7e7QEAVOFkCQXWpCb4PjTtrhdrYrJRQ=
 go.opentelemetry.io/contrib/propagators/ot v1.20.0/go.mod h1:gijQzxOq0JLj9lyZhTvqjDddGV/zaNagpPIn+2r8CEI=
 go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc=
 go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo=
-go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.44.0 h1:jd0+5t/YynESZqsSyPz+7PAFdEop0dlN0+PkyHYo8oI=
-go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.44.0/go.mod h1:U707O40ee1FpQGyhvqnzmCJm1Wh6OX6GGBVn0E6Uyyk=
 go.opentelemetry.io/otel/exporters/prometheus v0.44.0 h1:08qeJgaPC0YEBu2PQMbqU3rogTlyzpjhCI2b58Yn00w=
 go.opentelemetry.io/otel/exporters/prometheus v0.44.0/go.mod h1:ERL2uIeBtg4TxZdojHUwzZfIFlUIjZtxubT5p4h1Gjg=
 go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4=
diff --git a/pipelines/metrics.go b/pipelines/metrics.go
index 97bb288..87c323e 100644
--- a/pipelines/metrics.go
+++ b/pipelines/metrics.go
@@ -26,35 +26,18 @@ import (
 	"github.com/lightstep/otel-launcher-go/lightstep/sdk/metric/exporters/otlp/otelcol"
 	"github.com/lightstep/otel-launcher-go/lightstep/sdk/metric/sdkinstrument"
 	"github.com/lightstep/otel-launcher-go/lightstep/sdk/metric/view"
+	"google.golang.org/grpc/encoding/gzip"
 
 	// The v1 instrumentation
 	lightstepCputime "github.com/lightstep/otel-launcher-go/lightstep/instrumentation/cputime"
 	lightstepHost "github.com/lightstep/otel-launcher-go/lightstep/instrumentation/host"
 	lightstepRuntime "github.com/lightstep/otel-launcher-go/lightstep/instrumentation/runtime"
 
-	// The v0 instrumentation
-	contribHost "go.opentelemetry.io/contrib/instrumentation/host"
-	contribRuntime "go.opentelemetry.io/contrib/instrumentation/runtime"
-
 	// OTel APIs
 	"go.opentelemetry.io/otel"
 	"go.opentelemetry.io/otel/metric"
-
-	// The otel Metrics SDK
-	otelotlpmetricgrpc "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc"
-	otelsdkmetric "go.opentelemetry.io/otel/sdk/metric"
-	"go.opentelemetry.io/otel/sdk/metric/metricdata"
-	"google.golang.org/grpc/encoding/gzip"
 )
 
-func prestableHostMetrics(provider metric.MeterProvider) error {
-	return contribHost.Start(contribHost.WithMeterProvider(provider))
-}
-
-func prestableRuntimeMetrics(provider metric.MeterProvider) error {
-	return contribRuntime.Start(contribRuntime.WithMeterProvider(provider))
-}
-
 func stableHostMetrics(provider metric.MeterProvider) error {
 	return lightstepHost.Start(lightstepHost.WithMeterProvider(provider))
 }
@@ -73,25 +56,20 @@ func libraries(inits ...initFunc) []initFunc {
 	return inits
 }
 
-const prestableVersion = "prestable"
 const defaultVersion = "stable"
 
 var builtinMetricsVersions = map[string]map[string][]initFunc{
 	"all": {
-		defaultVersion:   libraries(stableHostMetrics, stableRuntimeMetrics, stableCputimeMetrics),
-		prestableVersion: libraries(prestableHostMetrics, prestableRuntimeMetrics),
+		defaultVersion: libraries(stableHostMetrics, stableRuntimeMetrics, stableCputimeMetrics),
 	},
 	"cputime": {
-		defaultVersion:   libraries(stableCputimeMetrics),
-		prestableVersion: libraries(),
+		defaultVersion: libraries(stableCputimeMetrics),
 	},
 	"host": {
-		defaultVersion:   libraries(stableHostMetrics),
-		prestableVersion: libraries(prestableHostMetrics),
+		defaultVersion: libraries(stableHostMetrics),
 	},
 	"runtime": {
-		defaultVersion:   libraries(stableRuntimeMetrics),
-		prestableVersion: libraries(prestableRuntimeMetrics),
+		defaultVersion: libraries(stableRuntimeMetrics),
 	},
 }
 
@@ -112,65 +90,29 @@ func NewMetricsPipeline(c PipelineConfig) (func() error, error) {
 	var provider metric.MeterProvider
 	var shutdown func() error
 
-	lsPref, otelPref, err := tempoOptions(c)
-	lsSecure, otelSecure := c.secureMetricOption()
+	lsPref, err := tempoOptions(c)
+	lsSecure := c.secureMetricOption()
 	if err != nil {
 		return nil, fmt.Errorf("invalid metric view configuration: %v", err)
 	}
 
-	if c.UseLightstepMetricsSDK {
-		// Install the Lightstep metrics SDK
-		metricExporter, err := c.newMetricsExporter(lsSecure)
-		if err != nil {
-			return nil, fmt.Errorf("failed to create metric exporter: %v", err)
-		}
-
-		if c.TLSSetting != nil {
-			// Credentials is not used
-			c.Credentials = nil
-		} else if c.Credentials != nil {
-			return nil, fmt.Errorf("use TLSSettings with the Lightstep metrics SDK, not Credentials")
-		}
-
-		sdk := sdkmetric.NewMeterProvider(
-			sdkmetric.WithResource(c.Resource),
-			sdkmetric.WithReader(
-				sdkmetric.NewPeriodicReader(metricExporter, period),
-				lsPref,
-			),
-		)
-
-		provider = sdk
-		shutdown = func() error {
-			return sdk.Shutdown(context.Background())
-		}
-
-	} else {
+	// Install the Lightstep metrics SDK
+	metricExporter, err := c.newMetricsExporter(lsSecure)
+	if err != nil {
+		return nil, fmt.Errorf("failed to create metric exporter: %v", err)
+	}
 
-		if c.Credentials != nil {
-			// TLSSetting is not used
-			c.TLSSetting = nil
-		} else if c.TLSSetting != nil {
-			return nil, fmt.Errorf("use Credentials with the OTel-Go metrics SDK, not TLSSetting")
-		}
+	sdk := sdkmetric.NewMeterProvider(
+		sdkmetric.WithResource(c.Resource),
+		sdkmetric.WithReader(
+			sdkmetric.NewPeriodicReader(metricExporter, period),
+			lsPref,
+		),
+	)
 
-		// Install the OTel-Go community metrics SDK.
-		metricExporter, err := c.newOtelMetricsExporter(otelPref, otelSecure)
-		if err != nil {
-			return nil, fmt.Errorf("failed to create metric exporter: %v", err)
-		}
-		meterProvider := otelsdkmetric.NewMeterProvider(
-			otelsdkmetric.WithResource(c.Resource),
-			otelsdkmetric.WithReader(otelsdkmetric.NewPeriodicReader(
-				metricExporter,
-				otelsdkmetric.WithInterval(period),
-			)),
-		)
-		otel.SetMeterProvider(meterProvider)
-		provider = meterProvider
-		shutdown = func() error {
-			return meterProvider.Shutdown(context.Background())
-		}
+	provider = sdk
+	shutdown = func() error {
+		return sdk.Shutdown(context.Background())
 	}
 
 	if c.MetricsBuiltinsEnabled {
@@ -216,21 +158,9 @@ func (c PipelineConfig) newMetricsExporter(secure otelcol.Option) (sdkmetric.Pus
 	)
 }
 
-func (c PipelineConfig) newOtelMetricsExporter(temporality otelsdkmetric.TemporalitySelector, secureOpt otelotlpmetricgrpc.Option) (otelsdkmetric.Exporter, error) {
-	return otelotlpmetricgrpc.New(
-		context.Background(),
-		secureOpt,
-		otelotlpmetricgrpc.WithTemporalitySelector(temporality),
-		otelotlpmetricgrpc.WithEndpoint(c.Endpoint),
-		otelotlpmetricgrpc.WithHeaders(c.Headers),
-		otelotlpmetricgrpc.WithCompressor(gzip.Name),
-	)
-}
-
-func tempoOptions(c PipelineConfig) (view.Option, otelsdkmetric.TemporalitySelector, error) {
+func tempoOptions(c PipelineConfig) (view.Option, error) {
 	syncPref := aggregation.CumulativeTemporality
 	asyncPref := aggregation.CumulativeTemporality
-	var otelSelector otelsdkmetric.TemporalitySelector
 
 	switch lower := strings.ToLower(c.TemporalityPreference); lower {
 	case "delta":
@@ -239,30 +169,11 @@ func tempoOptions(c PipelineConfig) (view.Option, otelsdkmetric.TemporalitySelec
 		// Lightstep users to choose.
 		syncPref = aggregation.DeltaTemporality
 		asyncPref = aggregation.DeltaTemporality
-
-		// Note: the following is incorrect for UpDownCounter
-		// and async UpDownCounter, which the OTel
-		// specification stipulates are not affected by the
-		// preference setting.  We WILL NOT FIX this defect.
-		// Instead, as otel-launcher-go v1.10.x will use the
-		// Lightstep metrics SDK by default.
-		otelSelector = func(otelsdkmetric.InstrumentKind) metricdata.Temporality {
-			return metricdata.DeltaTemporality
-		}
 	case "stateless", "lowmemory":
-		// asyncPref set above.
 		syncPref = aggregation.DeltaTemporality
-
-		otelSelector = func(otelsdkmetric.InstrumentKind) metricdata.Temporality {
-			return metricdata.DeltaTemporality
-		}
 	case "", "cumulative":
-		// syncPref, asyncPref set above.
-		otelSelector = func(otelsdkmetric.InstrumentKind) metricdata.Temporality {
-			return metricdata.CumulativeTemporality
-		}
 	default:
-		return nil, nil, fmt.Errorf("invalid temporality preference: %v", c.TemporalityPreference)
+		return nil, fmt.Errorf("invalid temporality preference: %v", c.TemporalityPreference)
 
 	}
 	return view.WithDefaultAggregationTemporalitySelector(
@@ -276,5 +187,5 @@ func tempoOptions(c PipelineConfig) (view.Option, otelsdkmetric.TemporalitySelec
 				return asyncPref
 			}
 		},
-	), otelSelector, nil
+	), nil
 }


Test patch:
diff --git a/launcher/config_test.go b/launcher/config_test.go
index 70e8c22..b92bed6 100644
--- a/launcher/config_test.go
+++ b/launcher/config_test.go
@@ -23,7 +23,6 @@ import (
 	"testing"
 	"time"
 
-	sdkmetric "github.com/lightstep/otel-launcher-go/lightstep/sdk/metric"
 	"github.com/lightstep/otel-launcher-go/pipelines/test"
 	"github.com/stretchr/testify/suite"
 	"go.opentelemetry.io/otel"
@@ -65,20 +64,6 @@ func (suite *testSuite) bothInsecureEndpointOptions() []Option {
 	}
 }
 
-func (suite *testSuite) insecureTraceEndpointOptions() []Option {
-	return []Option{
-		WithSpanExporterEndpoint(fmt.Sprintf(":%d", suite.Server.InsecureTracePort)),
-		WithSpanExporterInsecure(true),
-	}
-}
-
-func (suite *testSuite) insecureMetricsEndpointOptions() []Option {
-	return []Option{
-		WithSpanExporterEndpoint(fmt.Sprintf(":%d", suite.Server.InsecureMetricsPort)),
-		WithSpanExporterInsecure(true),
-	}
-}
-
 func (suite *testSuite) TearDownTest() {
 	unsetEnvironment()
 	suite.testLogger.reset()
@@ -162,49 +147,32 @@ func fakeAccessToken() string {
 }
 
 func (suite *testSuite) TestInvalidServiceName() {
-	lsOtel := ConfigureOpentelemetry(WithLogger(&suite.testLogger))
+	lsOtel := ConfigureOpentelemetry(
+		append(
+			suite.bothInsecureEndpointOptions(),
+			WithLogger(&suite.testLogger),
+		)...)
 	defer lsOtel.Shutdown()
 
 	expected := "invalid configuration: service name missing"
 	suite.requireLogContains(expected)
 }
 
-func (suite *testSuite) testInvalidMissingAccessToken(opts ...Option) {
+func (suite *testSuite) TestInvalidMissingDefaultAccessToken() {
 	lsOtel := ConfigureOpentelemetry(
-		append(opts,
-			WithLogger(&suite.testLogger),
-			WithServiceName("test-service"),
-		)...,
+		WithSpanExporterInsecure(true),
+		WithMetricExporterInsecure(true),
+		WithAccessToken(""),
+		WithLogger(&suite.testLogger),
+		WithServiceName("test-service"),
 	)
 	defer lsOtel.Shutdown()
 
+	// Note this test logs about invalid requests to the default
+	// endpoint!
 	suite.requireLogContains(expectedAccessTokenMissingError)
 }
 
-func (suite *testSuite) TestInvalidMissingDefaultAccessToken() {
-	suite.testInvalidMissingAccessToken(
-		WithAccessToken(""),
-	)
-}
-
-func (suite *testSuite) TestInvalidTraceDefaultAccessToken() {
-	suite.testInvalidMissingAccessToken(
-		append(suite.insecureMetricsEndpointOptions(),
-			WithAccessToken(""),
-			WithSpanExporterEndpoint(DefaultSpanExporterEndpoint),
-		)...,
-	)
-}
-
-func (suite *testSuite) TestInvalidMetricDefaultAccessToken() {
-	suite.testInvalidMissingAccessToken(
-		append(suite.insecureTraceEndpointOptions(),
-			WithAccessToken(""),
-			WithMetricExporterEndpoint(DefaultMetricExporterEndpoint),
-		)...,
-	)
-}
-
 func (suite *testSuite) testEndpointDisabled(expected string, opts ...Option) {
 	lsOtel := ConfigureOpentelemetry(
 		append(opts,
@@ -237,10 +205,13 @@ func (suite *testSuite) TestMetricEndpointDisabled() {
 
 func (suite *testSuite) TestValidConfig() {
 	lsOtel := ConfigureOpentelemetry(
-		WithLogger(&suite.testLogger),
-		WithServiceName("test-service"),
-		WithAccessToken(fakeAccessToken()),
-		WithErrorHandler(&suite.testErrorHandler),
+		append(
+			suite.bothInsecureEndpointOptions(),
+			WithLogger(&suite.testLogger),
+			WithServiceName("test-service"),
+			WithAccessToken(fakeAccessToken()),
+			WithErrorHandler(&suite.testErrorHandler),
+		)...,
 	)
 	defer lsOtel.Shutdown()
 
@@ -298,15 +269,16 @@ func (suite *testSuite) TestInvalidMetricsPushIntervalConfig() {
 
 func (suite *testSuite) TestDebugEnabled() {
 	lsOtel := ConfigureOpentelemetry(
-		WithLogger(&suite.testLogger),
-		WithServiceName("test-service"),
-		WithAccessToken("access-token-123-123456789abcdef"),
-		WithSpanExporterEndpoint("localhost:443"),
-		WithLogLevel("debug"),
-		WithResourceAttributes(map[string]string{
-			"attr1":     "val1",
-			"host.name": "host456",
-		}),
+		append(suite.bothInsecureEndpointOptions(),
+			WithLogger(&suite.testLogger),
+			WithServiceName("test-service"),
+			WithAccessToken("access-token-123-123456789abcdef"),
+			WithLogLevel("debug"),
+			WithResourceAttributes(map[string]string{
+				"attr1":     "val1",
+				"host.name": "host456",
+			}),
+		)...,
 	)
 	defer lsOtel.Shutdown()
 	output := strings.Join(suite.getOutput()[:], ",")
@@ -314,7 +286,6 @@ func (suite *testSuite) TestDebugEnabled() {
 	assert.Contains(output, "debug logging enabled")
 	assert.Contains(output, "test-service")
 	assert.Contains(output, "access-token-123")
-	assert.Contains(output, "localhost:443")
 	assert.Contains(output, "attr1")
 	assert.Contains(output, "val1")
 	assert.Contains(output, "host.name")
@@ -353,7 +324,6 @@ func (suite *testSuite) TestDefaultConfig() {
 		LogLevel:                            "info",
 		Propagators:                         []string{"b3"},
 		Resource:                            resource.NewWithAttributes(semconv.SchemaURL, attributes...),
-		UseLightstepMetricsSDK:              true,
 		logger:                              &suite.testLogger,
 		errorHandler:                        &suite.testErrorHandler,
 	}
@@ -393,7 +363,6 @@ func (suite *testSuite) TestEnvironmentVariables() {
 		LogLevel:                            "debug",
 		Propagators:                         []string{"b3", "w3c"},
 		Resource:                            resource.NewWithAttributes(semconv.SchemaURL, attributes...),
-		UseLightstepMetricsSDK:              true,
 		MetricsEnabled:                      false,
 		MetricsBuiltinsEnabled:              false,
 		MetricsBuiltinLibraries:             []string{"cputime:stable", "runtime:stable"},
@@ -422,7 +391,6 @@ func (suite *testSuite) TestConfigurationOverrides() {
 		WithLogger(&suite.testLogger),
 		WithErrorHandler(&suite.testErrorHandler),
 		WithPropagators([]string{"b3"}),
-		WithLightstepMetricsSDK(false),
 		WithMetricsEnabled(true),
 		WithMetricsBuiltinsEnabled(true),
 		WithMetricsBuiltinLibraries([]string{"host:stable"}),
@@ -452,7 +420,6 @@ func (suite *testSuite) TestConfigurationOverrides() {
 		LogLevel:                            "info",
 		Propagators:                         []string{"b3"},
 		Resource:                            resource.NewWithAttributes(semconv.SchemaURL, attributes...),
-		UseLightstepMetricsSDK:              false,
 		MetricsEnabled:                      true,
 		MetricsBuiltinsEnabled:              true,
 		MetricsBuiltinLibraries:             []string{"host:stable"},
@@ -491,7 +458,7 @@ func (suite *testSuite) TestConfigurePropagators() {
 	ctx := baggage.ContextWithBaggage(context.Background(), bag)
 
 	lsOtel := ConfigureOpentelemetry(
-		append(suite.insecureTraceEndpointOptions(),
+		append(suite.bothInsecureEndpointOptions(),
 			WithLogger(&suite.testLogger),
 			WithServiceName("test-service"),
 		)...,
@@ -507,7 +474,7 @@ func (suite *testSuite) TestConfigurePropagators() {
 	assert.Equal(len(carrier.Get("traceparent")), 0)
 
 	lsOtel = ConfigureOpentelemetry(
-		append(suite.insecureTraceEndpointOptions(),
+		append(suite.bothInsecureEndpointOptions(),
 			WithLogger(&suite.testLogger),
 			WithServiceName("test-service"),
 			WithPropagators([]string{"b3", "baggage", "tracecontext"}),
@@ -601,17 +568,6 @@ func (suite *testSuite) TestConfigureResourcesAttributes() {
 	assert.Equal(expected, resource.Attributes())
 }
 
-func (suite *testSuite) TestServiceNameViaResourceAttributes() {
-	os.Setenv("OTEL_RESOURCE_ATTRIBUTES", "service.name=test-service-b")
-	lsOtel := ConfigureOpentelemetry(WithLogger(&suite.testLogger))
-	defer lsOtel.Shutdown()
-
-	expected := "invalid configuration: service name missing"
-	if strings.Contains(suite.getOutput()[0], expected) {
-		suite.T().Errorf("\nString found: %v\nIn: %v", expected, suite.getOutput()[0])
-	}
-}
-
 func (suite *testSuite) TestEmptyHostnameDefaultsToOsHostname() {
 	assert := suite.Assert()
 	os.Setenv("OTEL_RESOURCE_ATTRIBUTES", "host.name=")
@@ -702,19 +658,3 @@ func TestMain(m *testing.M) {
 	unsetEnvironment()
 	os.Exit(m.Run())
 }
-
-func (suite *testSuite) TestLightstepMetricsSDK() {
-	lsOtel := ConfigureOpentelemetry(
-		append(suite.bothInsecureEndpointOptions(),
-			WithServiceName("test-service"),
-			WithAccessToken(fakeAccessToken()),
-			WithLightstepMetricsSDK(true),
-		)...,
-	)
-	defer lsOtel.Shutdown()
-
-	sdk := otel.GetMeterProvider()
-	if _, ok := sdk.(*sdkmetric.MeterProvider); !ok {
-		suite.T().Errorf("did not find a lightstep metrics SDK")
-	}
-}
diff --git a/pipelines/metrics_test.go b/pipelines/metrics_test.go
index 2291960..e401a69 100644
--- a/pipelines/metrics_test.go
+++ b/pipelines/metrics_test.go
@@ -16,14 +16,11 @@ package pipelines
 
 import (
 	"context"
-	"crypto/tls"
-	"crypto/x509"
 	"fmt"
 	"testing"
 
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
-	"google.golang.org/grpc/credentials"
 	"google.golang.org/protobuf/encoding/prototext"
 
 	"github.com/lightstep/otel-launcher-go/pipelines/test"
@@ -34,20 +31,6 @@ import (
 	semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
 )
 
-func newTLSConfig() *tls.Config {
-	certPool := x509.NewCertPool()
-
-	ok := certPool.AppendCertsFromPEM([]byte(test.TestCARootCertificate))
-
-	if !ok {
-		panic("could not parse certificate authority certificate")
-	}
-	return &tls.Config{
-		RootCAs:    certPool,
-		ServerName: test.ServerName,
-	}
-}
-
 func newTLSClientSetting() *configtls.TLSClientSetting {
 	return &configtls.TLSClientSetting{
 		TLSSetting: configtls.TLSSetting{
@@ -81,7 +64,6 @@ func testInsecureMetrics(t *testing.T, lightstepSDK, builtins bool) {
 		ReportingPeriod:         "24h",
 		MetricsBuiltinsEnabled:  builtins,
 		MetricsBuiltinLibraries: []string{"cputime:stable"},
-		UseLightstepMetricsSDK:  lightstepSDK,
 	})
 	assert.NoError(t, err)
 
@@ -129,13 +111,8 @@ func testSecureMetrics(t *testing.T, lightstepSDK, builtins bool) {
 		ReportingPeriod:         "24h",
 		MetricsBuiltinsEnabled:  builtins,
 		MetricsBuiltinLibraries: []string{"cputime:stable"},
-		UseLightstepMetricsSDK:  lightstepSDK,
-	}
-	if lightstepSDK {
-		cfg.TLSSetting = newTLSClientSetting()
-	} else {
-		cfg.Credentials = credentials.NewTLS(newTLSConfig())
 	}
+	cfg.TLSSetting = newTLSClientSetting()
 
 	shutdown, err := NewMetricsPipeline(cfg)
 	require.NoError(t, err)
@@ -212,7 +189,6 @@ func testBuiltinMetrics(t *testing.T, builtins []string, expectMetric string) {
 		Resource:                resource.Empty(),
 		MetricsBuiltinsEnabled:  true,
 		MetricsBuiltinLibraries: builtins,
-		UseLightstepMetricsSDK:  true,
 	})
 	assert.NoError(t, err)
 
@@ -246,15 +222,9 @@ func TestBuiltins(t *testing.T) {
 		// empty version: success
 		{[]string{"cputime:"}, "process.uptime"},
 
-		// Old runtime library
-		{[]string{"runtime:prestable"}, "runtime.uptime"},
-
 		// New runtime library
 		{[]string{"runtime:stable"}, "process.runtime.go.gc.heap.frees.objects"},
 
-		// Old host library
-		{[]string{"host:prestable"}, "system.cpu.time"},
-
 		// New host library
 		{[]string{"host:stable"}, "system.cpu.time"},
 
@@ -262,10 +232,6 @@ func TestBuiltins(t *testing.T) {
 		{[]string{"all:stable"}, "system.cpu.time"},
 		{[]string{"all:stable"}, "process.uptime"},
 		{[]string{"all:stable"}, "process.runtime.go.gc.heap.frees.objects"},
-
-		// All prestable libraries
-		{[]string{"all:prestable"}, "process.cpu.time"},
-		{[]string{"all:prestable"}, "runtime.uptime"},
 	} {
 		testBuiltinMetrics(t, test.Builtins, test.Expect)
 	}