Use published MetricExporterFactory
MODIFY
.circleci/collect_libs.sh
.circleci/collect_libs.sh
@@ -11,4 +11,3 @@ mkdir -p $LIBS_DIR >/dev/null 2>&1
cp workspace/java-agent/build/libs/*.jar $LIBS_DIR/
cp workspace/auto-exporters/*/build/libs/*.jar $LIBS_DIR/
-cp workspace/exporter-support/build/libs/*.jar $LIBS_DIR/

MODIFY
CONTRIBUTING.md
CONTRIBUTING.md
@@ -91,7 +91,6 @@ on the green checkmark you can view the `build_test_deploy` workflow and the
named like:
```
-libs/exporter-support-<version>-SNAPSHOT.jar
libs/opentelemetry-auto-<version>-SNAPSHOT.jar
libs/opentelemetry-auto-exporters-jaeger-<version>-SNAPSHOT.jar
libs/opentelemetry-auto-exporters-logging-<version>-SNAPSHOT.jar

MODIFY
agent-tooling/agent-tooling.gradle
agent-tooling/agent-tooling.gradle
@@ -21,9 +21,6 @@ dependencies {
compile deps.opentelemetrySdkAutoConfig
compile deps.opentelemetryTraceProps
- // TODO: move the interface in exporter-support into opentelemetry-sdk-contrib-auto-config
- compile project(':exporter-support')
-
compile group: 'com.blogspot.mydailyjava', name: 'weak-lock-free', version: '0.15'
compile deps.bytebuddy
compile deps.bytebuddyagent

MODIFY
agent-tooling/src/main/java/io/opentelemetry/auto/tooling/TracerInstaller.java
agent-tooling/src/main/java/io/opentelemetry/auto/tooling/TracerInstaller.java
@@ -17,8 +17,8 @@ package io.opentelemetry.auto.tooling;
import com.google.common.annotations.VisibleForTesting;
import io.opentelemetry.auto.config.Config;
-import io.opentelemetry.auto.exportersupport.MetricExporterFactory;
import io.opentelemetry.sdk.OpenTelemetrySdk;
+import io.opentelemetry.sdk.contrib.auto.config.MetricExporterFactory;
import io.opentelemetry.sdk.contrib.auto.config.SpanExporterFactory;
import io.opentelemetry.sdk.metrics.export.IntervalMetricReader;
import io.opentelemetry.sdk.metrics.export.MetricExporter;
@@ -72,7 +72,7 @@ public class TracerInstaller {
getExporterFactory(SpanExporterFactory.class, exporterLoader);
if (spanExporterFactory != null) {
final SpanExporter spanExporter = spanExporterFactory.fromConfig(config);
- BatchSpanProcessor spanProcessor =
+ final BatchSpanProcessor spanProcessor =
BatchSpanProcessor.newBuilder(spanExporter)
.readEnvironmentVariables()
.readSystemProperties()
@@ -115,7 +115,8 @@ public class TracerInstaller {
private static void configure() {
/** Update trace config from env vars or sys props */
- TraceConfig activeTraceConfig = OpenTelemetrySdk.getTracerProvider().getActiveTraceConfig();
+ final TraceConfig activeTraceConfig =
+ OpenTelemetrySdk.getTracerProvider().getActiveTraceConfig();
OpenTelemetrySdk.getTracerProvider()
.updateActiveTraceConfig(
activeTraceConfig

MODIFY
auto-exporters/otlp/otlp.gradle
auto-exporters/otlp/otlp.gradle
@@ -10,8 +10,6 @@ dependencies {
exclude group: 'io.opentelemetry', module: 'opentelemetry-sdk'
}
compileOnly deps.opentelemetrySdkAutoConfig
- // TODO: move the interface in exporter-support into opentelemetry-sdk-contrib-auto-config
- compile project(':exporter-support')
compile group: 'io.grpc', name: 'grpc-api', version: '1.24.0'
compile group: 'io.grpc', name: 'grpc-netty-shaded', version: '1.24.0'
}

MODIFY
auto-exporters/otlp/src/main/java/io/opentelemetry/auto/exporters/otlp/OtlpMetricExporterFactory.java
auto-exporters/otlp/src/main/java/io/opentelemetry/auto/exporters/otlp/OtlpMetricExporterFactory.java
package io.opentelemetry.auto.exporters.otlp;
import io.grpc.ManagedChannelBuilder;
-import io.opentelemetry.auto.exportersupport.MetricExporterFactory;
import io.opentelemetry.exporters.otlp.OtlpGrpcMetricExporter;
import io.opentelemetry.sdk.contrib.auto.config.Config;
+import io.opentelemetry.sdk.contrib.auto.config.MetricExporterFactory;
import io.opentelemetry.sdk.metrics.export.MetricExporter;
public class OtlpMetricExporterFactory implements MetricExporterFactory {

RENAME
auto-exporters/otlp/src/main/resources/META-INF/services/io.opentelemetry.auto.exportersupport.MetricExporterFactory
auto-exporters/otlp/src/main/resources/META-INF/services/io.opentelemetry.sdk.contrib.auto.config.MetricExporterFactory
DELETE
exporter-support/exporter-support.gradle
-apply from: "${rootDir}/gradle/java.gradle"
-
-dependencies {
- compileOnly deps.opentelemetrySdk
- compileOnly deps.opentelemetrySdkAutoConfig
-}

DELETE
exporter-support/src/main/java/io/opentelemetry/auto/exportersupport/MetricExporterFactory.java
-/*
- * Copyright The OpenTelemetry Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.opentelemetry.auto.exportersupport;
-
-import io.opentelemetry.sdk.contrib.auto.config.Config;
-import io.opentelemetry.sdk.metrics.export.MetricExporter;
-
-public interface MetricExporterFactory {
- MetricExporter fromConfig(Config config);
-}

MODIFY
settings.gradle
settings.gradle
@@ -149,9 +149,6 @@ include ':instrumentation:vertx-testing'
include ':instrumentation-core:aws-sdk:aws-sdk-2.2-core'
-// exporter support
-include ':exporter-support'
-
// exporter adapters
include ":auto-exporters"
include ":auto-exporters:jaeger"

Use published MetricExporterFactory (#493)