diff --git a/auto-instrumentation/okhttp/okhttp-3.0/README.md b/auto-instrumentation/okhttp/okhttp-3.0/README.md new file mode 100644 index 000000000..9b4c21548 --- /dev/null +++ b/auto-instrumentation/okhttp/okhttp-3.0/README.md @@ -0,0 +1,39 @@ +# Android Instrumentation for OkHttp version 3.0 and higher + +Provides OpenTelemetry instrumentation for [okhttp3](https://square.github.io/okhttp/). + +## Quickstart + +### Add these dependencies to your project + +Replace `OPENTELEMETRY_VERSION` with the [latest +release](https://search.maven.org/search?q=g:io.opentelemetry.android%20AND%20a:okhttp-3.0-library). + +Replace `BYTEBUDDY_VERSION` with the [latest +release](https://search.maven.org/search?q=g:net.bytebuddy%20AND%20a:byte-buddy). + +#### Byte buddy compilation plugin + +This plugin leverages +Android's [ASM API](https://developer.android.com/reference/tools/gradle-api/8.0/com/android/build/api/instrumentation/AsmClassVisitorFactory) +to instrument bytecode at compile time. You can find more info on +its [repo page](https://github.com/raphw/byte-buddy/tree/master/byte-buddy-gradle-plugin/android-plugin. + +```groovy +plugins { + id 'net.bytebuddy.byte-buddy-gradle-plugin' version 'BYTEBUDDY_VERSION' +} +``` + +#### Project dependencies + +```kotlin +implementation("io.opentelemetry.android:okhttp-3.0-library:OPENTELEMETRY_VERSION") +byteBuddy("io.opentelemetry.android:okhttp-3.0-agent:OPENTELEMETRY_VERSION") + +After adding the plugin and the dependencies to your project, your OkHttp requests will be traced automatically. + +### Configuration + +You can configure the automatic instrumentation by using the setters +in [OkHttpInstrumentationConfig](library/src/main/java/io/opentelemetry/instrumentation/library/okhttp/v3_0/OkHttpInstrumentationConfig.java)). diff --git a/auto-instrumentation/okhttp/okhttp-3.0/agent/build.gradle.kts b/auto-instrumentation/okhttp/okhttp-3.0/agent/build.gradle.kts new file mode 100644 index 000000000..43fd5f5c2 --- /dev/null +++ b/auto-instrumentation/okhttp/okhttp-3.0/agent/build.gradle.kts @@ -0,0 +1,9 @@ +plugins { + id("otel.java-library-conventions") + id("otel.publish-conventions") +} + +dependencies { + implementation(project(":auto-instrumentation:okhttp:okhttp-3.0:library")) + implementation("net.bytebuddy:byte-buddy:${property("bytebuddy.version")}") +} diff --git a/auto-instrumentation/okhttp/okhttp-3.0/agent/src/main/java/io/opentelemetry/instrumentation/agent/okhttp/v3_0/OkHttpClientAdvice.java b/auto-instrumentation/okhttp/okhttp-3.0/agent/src/main/java/io/opentelemetry/instrumentation/agent/okhttp/v3_0/OkHttpClientAdvice.java new file mode 100644 index 000000000..f46a3fe2c --- /dev/null +++ b/auto-instrumentation/okhttp/okhttp-3.0/agent/src/main/java/io/opentelemetry/instrumentation/agent/okhttp/v3_0/OkHttpClientAdvice.java @@ -0,0 +1,24 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.instrumentation.agent.okhttp.v3_0; + +import io.opentelemetry.instrumentation.library.okhttp.v3_0.internal.OkHttp3Singletons; +import net.bytebuddy.asm.Advice; +import okhttp3.OkHttpClient; + +public class OkHttpClientAdvice { + + @Advice.OnMethodEnter + public static void enter(@Advice.Argument(0) OkHttpClient.Builder builder) { + if (!builder.interceptors().contains(OkHttp3Singletons.CONTEXT_INTERCEPTOR)) { + builder.interceptors().add(0, OkHttp3Singletons.CONTEXT_INTERCEPTOR); + builder.interceptors().add(1, OkHttp3Singletons.CONNECTION_ERROR_INTERCEPTOR); + } + if (!builder.networkInterceptors().contains(OkHttp3Singletons.TRACING_INTERCEPTOR)) { + builder.addNetworkInterceptor(OkHttp3Singletons.TRACING_INTERCEPTOR); + } + } +} diff --git a/auto-instrumentation/okhttp/okhttp-3.0/agent/src/main/java/io/opentelemetry/instrumentation/agent/okhttp/v3_0/OkHttpClientPlugin.java b/auto-instrumentation/okhttp/okhttp-3.0/agent/src/main/java/io/opentelemetry/instrumentation/agent/okhttp/v3_0/OkHttpClientPlugin.java new file mode 100644 index 000000000..a2f17b06b --- /dev/null +++ b/auto-instrumentation/okhttp/okhttp-3.0/agent/src/main/java/io/opentelemetry/instrumentation/agent/okhttp/v3_0/OkHttpClientPlugin.java @@ -0,0 +1,42 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.instrumentation.agent.okhttp.v3_0; + +import java.io.IOException; +import net.bytebuddy.asm.Advice; +import net.bytebuddy.build.Plugin; +import net.bytebuddy.description.type.TypeDescription; +import net.bytebuddy.dynamic.ClassFileLocator; +import net.bytebuddy.dynamic.DynamicType; +import net.bytebuddy.matcher.ElementMatchers; +import okhttp3.OkHttpClient; + +public class OkHttpClientPlugin implements Plugin { + + @Override + public DynamicType.Builder apply( + DynamicType.Builder builder, + TypeDescription typeDescription, + ClassFileLocator classFileLocator) { + return builder.visit( + Advice.to(OkHttpClientAdvice.class) + .on( + ElementMatchers.isConstructor() + .and( + ElementMatchers.takesArguments( + OkHttpClient.Builder.class)))); + } + + @Override + public void close() throws IOException { + // No operation. + } + + @Override + public boolean matches(TypeDescription target) { + return target.getTypeName().equals("okhttp3.OkHttpClient"); + } +} diff --git a/auto-instrumentation/okhttp/okhttp-3.0/agent/src/main/resources/META-INF/net.bytebuddy/build.plugins b/auto-instrumentation/okhttp/okhttp-3.0/agent/src/main/resources/META-INF/net.bytebuddy/build.plugins new file mode 100644 index 000000000..b5322f2c8 --- /dev/null +++ b/auto-instrumentation/okhttp/okhttp-3.0/agent/src/main/resources/META-INF/net.bytebuddy/build.plugins @@ -0,0 +1 @@ +io.opentelemetry.instrumentation.agent.okhttp.v3_0.OkHttpClientPlugin \ No newline at end of file diff --git a/auto-instrumentation/okhttp/okhttp-3.0/library/build.gradle.kts b/auto-instrumentation/okhttp/okhttp-3.0/library/build.gradle.kts new file mode 100644 index 000000000..fd790245b --- /dev/null +++ b/auto-instrumentation/okhttp/okhttp-3.0/library/build.gradle.kts @@ -0,0 +1,11 @@ +plugins { + id("otel.java-library-conventions") + id("otel.publish-conventions") +} + +val otelVersion = project.property("otel.sdk.version") +dependencies { + api("com.squareup.okhttp3:okhttp:3.0.0") + api("io.opentelemetry.instrumentation:opentelemetry-okhttp-3.0:$otelVersion-alpha") + implementation("io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-semconv:$otelVersion-alpha") +} diff --git a/auto-instrumentation/okhttp/okhttp-3.0/library/src/main/java/io/opentelemetry/instrumentation/library/okhttp/v3_0/OkHttpInstrumentationConfig.java b/auto-instrumentation/okhttp/okhttp-3.0/library/src/main/java/io/opentelemetry/instrumentation/library/okhttp/v3_0/OkHttpInstrumentationConfig.java new file mode 100644 index 000000000..77c8d1e99 --- /dev/null +++ b/auto-instrumentation/okhttp/okhttp-3.0/library/src/main/java/io/opentelemetry/instrumentation/library/okhttp/v3_0/OkHttpInstrumentationConfig.java @@ -0,0 +1,120 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.instrumentation.library.okhttp.v3_0; + +import io.opentelemetry.instrumentation.api.internal.HttpConstants; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** Configuration for automatic instrumentation of okhttp requests. */ +public final class OkHttpInstrumentationConfig { + private static List capturedRequestHeaders = new ArrayList<>(); + private static List capturedResponseHeaders = new ArrayList<>(); + private static Set knownMethods = new HashSet<>(); + private static Map peerServiceMapping = new HashMap<>(); + private static boolean emitExperimentalHttpClientMetrics; + + private OkHttpInstrumentationConfig() {} + + /** + * Configures the HTTP request headers that will be captured as span attributes as described in + * HTTP + * semantic conventions. + * + *

The HTTP request header values will be captured under the {@code + * http.request.header.} attribute key. The {@code } part in the attribute key is + * the normalized header name: lowercase, with dashes replaced by underscores. + * + * @param requestHeaders A list of HTTP header names. + */ + public static void setCapturedRequestHeaders(List requestHeaders) { + OkHttpInstrumentationConfig.capturedRequestHeaders = new ArrayList<>(requestHeaders); + } + + public static List getCapturedRequestHeaders() { + return capturedRequestHeaders; + } + + /** + * Configures the HTTP response headers that will be captured as span attributes as described in + * HTTP + * semantic conventions. + * + *

The HTTP response header values will be captured under the {@code + * http.response.header.} attribute key. The {@code } part in the attribute key is + * the normalized header name: lowercase, with dashes replaced by underscores. + * + * @param responseHeaders A list of HTTP header names. + */ + public static void setCapturedResponseHeaders(List responseHeaders) { + OkHttpInstrumentationConfig.capturedResponseHeaders = new ArrayList<>(responseHeaders); + } + + public static List getCapturedResponseHeaders() { + return capturedResponseHeaders; + } + + /** + * Configures the attrs extractor to recognize an alternative set of HTTP request methods. + * + *

By default, the extractor defines "known" methods as the ones listed in RFC9110 and the PATCH + * method defined in RFC5789. If an + * unknown method is encountered, the extractor will use the value {@value HttpConstants#_OTHER} + * instead of it and put the original value in an extra {@code http.request.method_original} + * attribute. + * + *

Note: calling this method overrides the default known method sets completely; it + * does not supplement it. + * + * @param knownMethods A set of recognized HTTP request methods. + */ + public static void setKnownMethods(Set knownMethods) { + OkHttpInstrumentationConfig.knownMethods = new HashSet<>(knownMethods); + } + + public static Set getKnownMethods() { + return knownMethods; + } + + /** + * Configures the extractor of the {@code peer.service} span attribute, described in the + * specification. + */ + public static void setPeerServiceMapping(Map peerServiceMapping) { + OkHttpInstrumentationConfig.peerServiceMapping = new HashMap<>(peerServiceMapping); + } + + public static Map getPeerServiceMapping() { + return peerServiceMapping; + } + + /** + * When enabled keeps track of non-stable + * HTTP client metrics: the + * request size and the + * the response size. + */ + public static void setEmitExperimentalHttpClientMetrics( + boolean emitExperimentalHttpClientMetrics) { + OkHttpInstrumentationConfig.emitExperimentalHttpClientMetrics = + emitExperimentalHttpClientMetrics; + } + + public static boolean emitExperimentalHttpClientMetrics() { + return emitExperimentalHttpClientMetrics; + } +} diff --git a/auto-instrumentation/okhttp/okhttp-3.0/library/src/main/java/io/opentelemetry/instrumentation/library/okhttp/v3_0/internal/OkHttp3Singletons.java b/auto-instrumentation/okhttp/okhttp-3.0/library/src/main/java/io/opentelemetry/instrumentation/library/okhttp/v3_0/internal/OkHttp3Singletons.java new file mode 100644 index 000000000..9170fc5a1 --- /dev/null +++ b/auto-instrumentation/okhttp/okhttp-3.0/library/src/main/java/io/opentelemetry/instrumentation/library/okhttp/v3_0/internal/OkHttp3Singletons.java @@ -0,0 +1,61 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.instrumentation.library.okhttp.v3_0.internal; + +import static java.util.Collections.singletonList; + +import io.opentelemetry.api.GlobalOpenTelemetry; +import io.opentelemetry.context.Context; +import io.opentelemetry.context.Scope; +import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter; +import io.opentelemetry.instrumentation.api.instrumenter.http.HttpClientResend; +import io.opentelemetry.instrumentation.api.instrumenter.net.PeerServiceAttributesExtractor; +import io.opentelemetry.instrumentation.library.okhttp.v3_0.OkHttpInstrumentationConfig; +import io.opentelemetry.instrumentation.okhttp.v3_0.internal.ConnectionErrorSpanInterceptor; +import io.opentelemetry.instrumentation.okhttp.v3_0.internal.OkHttpAttributesGetter; +import io.opentelemetry.instrumentation.okhttp.v3_0.internal.OkHttpInstrumenterFactory; +import io.opentelemetry.instrumentation.okhttp.v3_0.internal.TracingInterceptor; +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; + +/** + * This class is internal and is hence not for public use. Its APIs are unstable and can change at + * any time. + */ +public final class OkHttp3Singletons { + + private static final Instrumenter INSTRUMENTER = + OkHttpInstrumenterFactory.create( + GlobalOpenTelemetry.get(), + builder -> + builder.setCapturedRequestHeaders( + OkHttpInstrumentationConfig.getCapturedRequestHeaders()) + .setCapturedResponseHeaders( + OkHttpInstrumentationConfig + .getCapturedResponseHeaders()) + .setKnownMethods(OkHttpInstrumentationConfig.getKnownMethods()), + singletonList( + PeerServiceAttributesExtractor.create( + OkHttpAttributesGetter.INSTANCE, + OkHttpInstrumentationConfig.getPeerServiceMapping())), + OkHttpInstrumentationConfig.emitExperimentalHttpClientMetrics()); + + public static final Interceptor CONTEXT_INTERCEPTOR = + chain -> { + try (Scope ignored = HttpClientResend.initialize(Context.current()).makeCurrent()) { + return chain.proceed(chain.request()); + } + }; + + public static final Interceptor CONNECTION_ERROR_INTERCEPTOR = + new ConnectionErrorSpanInterceptor(INSTRUMENTER); + + public static final Interceptor TRACING_INTERCEPTOR = + new TracingInterceptor(INSTRUMENTER, GlobalOpenTelemetry.getPropagators()); + + private OkHttp3Singletons() {} +} diff --git a/auto-instrumentation/okhttp/okhttp-3.0/library/src/main/java/io/opentelemetry/instrumentation/library/okhttp/v3_0/package-info.java b/auto-instrumentation/okhttp/okhttp-3.0/library/src/main/java/io/opentelemetry/instrumentation/library/okhttp/v3_0/package-info.java new file mode 100644 index 000000000..f532a6f15 --- /dev/null +++ b/auto-instrumentation/okhttp/okhttp-3.0/library/src/main/java/io/opentelemetry/instrumentation/library/okhttp/v3_0/package-info.java @@ -0,0 +1,5 @@ +/** OkHttp 3 auto instrumentation runtime. */ +@ParametersAreNonnullByDefault +package io.opentelemetry.instrumentation.library.okhttp.v3_0; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/auto-instrumentation/okhttp/okhttp-3.0/testing/build.gradle.kts b/auto-instrumentation/okhttp/okhttp-3.0/testing/build.gradle.kts new file mode 100644 index 000000000..acbf889d4 --- /dev/null +++ b/auto-instrumentation/okhttp/okhttp-3.0/testing/build.gradle.kts @@ -0,0 +1,11 @@ +plugins { + id("otel.android-app-conventions") + id("net.bytebuddy.byte-buddy-gradle-plugin") +} + +dependencies { + byteBuddy(project(":auto-instrumentation:okhttp:okhttp-3.0:agent")) + implementation(project(":auto-instrumentation:okhttp:okhttp-3.0:library")) + implementation("com.squareup.okhttp3:okhttp:4.11.0") + androidTestImplementation("com.squareup.okhttp3:mockwebserver:4.11.0") +} diff --git a/auto-instrumentation/okhttp/okhttp-3.0/testing/src/androidTest/java/io/opentelemetry/instrumentation/library/okhttp/v3_0/InstrumentationTest.java b/auto-instrumentation/okhttp/okhttp-3.0/testing/src/androidTest/java/io/opentelemetry/instrumentation/library/okhttp/v3_0/InstrumentationTest.java new file mode 100644 index 000000000..f1d79360a --- /dev/null +++ b/auto-instrumentation/okhttp/okhttp-3.0/testing/src/androidTest/java/io/opentelemetry/instrumentation/library/okhttp/v3_0/InstrumentationTest.java @@ -0,0 +1,66 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.instrumentation.library.okhttp.v3_0; + +import static org.junit.Assert.assertEquals; + +import androidx.annotation.NonNull; +import io.opentelemetry.sdk.OpenTelemetrySdk; +import io.opentelemetry.sdk.testing.exporter.InMemorySpanExporter; +import io.opentelemetry.sdk.trace.SdkTracerProvider; +import io.opentelemetry.sdk.trace.export.SimpleSpanProcessor; +import java.io.IOException; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import okhttp3.mockwebserver.MockResponse; +import okhttp3.mockwebserver.MockWebServer; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class InstrumentationTest { + private MockWebServer server; + + @Before + public void setUp() throws IOException { + server = new MockWebServer(); + server.start(); + } + + @After + public void tearDown() throws IOException { + server.shutdown(); + } + + @Test + public void okhttpTraces() throws IOException { + InMemorySpanExporter spanExporter = InMemorySpanExporter.create(); + OpenTelemetrySdk.builder() + .setTracerProvider(getSimpleTracerProvider(spanExporter)) + .buildAndRegisterGlobal(); + + server.enqueue(new MockResponse().setResponseCode(200)); + + OkHttpClient client = new OkHttpClient(); + executeRequest(client, "/test/"); + + assertEquals(1, spanExporter.getFinishedSpanItems().size()); + } + + private void executeRequest(OkHttpClient client, String urlPath) throws IOException { + Request request = new Request.Builder().url(server.url(urlPath)).build(); + Response response = client.newCall(request).execute(); + response.body().bytes(); + } + + @NonNull + private static SdkTracerProvider getSimpleTracerProvider(InMemorySpanExporter spanExporter) { + return SdkTracerProvider.builder() + .addSpanProcessor(SimpleSpanProcessor.create(spanExporter)) + .build(); + } +} diff --git a/auto-instrumentation/okhttp/okhttp-3.0/testing/src/main/AndroidManifest.xml b/auto-instrumentation/okhttp/okhttp-3.0/testing/src/main/AndroidManifest.xml new file mode 100644 index 000000000..56a9e28a2 --- /dev/null +++ b/auto-instrumentation/okhttp/okhttp-3.0/testing/src/main/AndroidManifest.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/build.gradle.kts b/build.gradle.kts index 33952d3cd..ad623a5aa 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,6 +7,7 @@ buildscript { dependencies { // keep this version in sync with /buildSrc/build.gradle.kts classpath("com.android.tools.build:gradle:8.1.1") + classpath("net.bytebuddy:byte-buddy-gradle-plugin:${property("bytebuddy.version")}") } } diff --git a/buildSrc/src/main/kotlin/otel.android-app-conventions.gradle.kts b/buildSrc/src/main/kotlin/otel.android-app-conventions.gradle.kts new file mode 100644 index 000000000..5f8450459 --- /dev/null +++ b/buildSrc/src/main/kotlin/otel.android-app-conventions.gradle.kts @@ -0,0 +1,29 @@ +import com.android.build.api.dsl.LibraryExtension +import org.gradle.api.publish.maven.MavenPublication + +plugins { + id("com.android.application") + id("otel.errorprone-conventions") +} + +android { + namespace = "io.opentelemetry.android" + compileSdk = (property("android.compileSdk") as String).toInt() + + defaultConfig { + minSdk = (property("android.minSdk") as String).toInt() + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + compileOptions { + val javaVersion = rootProject.extra["java_version"] as JavaVersion + sourceCompatibility(javaVersion) + targetCompatibility(javaVersion) + } +} + +val otelVersion = rootProject.property("otel.sdk.version") +dependencies { + androidTestImplementation("androidx.test:runner:1.5.2") + androidTestImplementation("io.opentelemetry:opentelemetry-sdk-testing:$otelVersion") +} \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/otel.android-library-conventions.gradle.kts b/buildSrc/src/main/kotlin/otel.android-library-conventions.gradle.kts index fa4251c5b..f34b90f58 100644 --- a/buildSrc/src/main/kotlin/otel.android-library-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/otel.android-library-conventions.gradle.kts @@ -7,8 +7,10 @@ plugins { } android { + compileSdk = (property("android.compileSdk") as String).toInt() + defaultConfig { - minSdk = (project.property("android.minSdk") as String).toInt() + minSdk = (property("android.minSdk") as String).toInt() } lint { diff --git a/buildSrc/src/main/kotlin/otel.java-library-conventions.gradle.kts b/buildSrc/src/main/kotlin/otel.java-library-conventions.gradle.kts index 2846182f2..1628d9a27 100644 --- a/buildSrc/src/main/kotlin/otel.java-library-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/otel.java-library-conventions.gradle.kts @@ -14,6 +14,7 @@ java { dependencies { signature("com.toasttab.android:gummy-bears-api-${project.property("android.minSdk")}:0.5.1:coreLib@signature") + implementation("com.google.code.findbugs:jsr305:3.0.2") } animalsniffer { diff --git a/buildSrc/src/main/kotlin/otel.publish-conventions.gradle.kts b/buildSrc/src/main/kotlin/otel.publish-conventions.gradle.kts index 44baa5c17..5118cfe4e 100644 --- a/buildSrc/src/main/kotlin/otel.publish-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/otel.publish-conventions.gradle.kts @@ -33,6 +33,7 @@ if (android != null) { afterEvaluate { publishing.publications { val maven = create("maven") { + artifactId = computeArtifactId() if (android != null) { from(components.findByName(androidVariantToRelease)) } else { @@ -75,3 +76,19 @@ afterEvaluate { } } } + +fun computeArtifactId(): String { + val path = project.path + if (!path.contains("auto-instrumentation")) { + // Return default artifacId for non auto-instrumentation publications. + return project.name + } + + // Adding library name to its related auto-instrumentation subprojects. + // For example, prepending "okhttp-3.0-" to both the "library" and "agent" subprojects inside the "okhttp-3.0" folder. + val match = Regex("[^:]+:[^:]+\$").find(path) + val artifactId = match!!.value.replace(":", "-") + + logger.debug("Using artifact id: '{}' for subproject: '{}'", artifactId, path) + return artifactId +} diff --git a/gradle.properties b/gradle.properties index 4c9a8d811..f821331d0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -19,7 +19,9 @@ android.useAndroidX=true # generate the BuildConfig class that contains the app version android.defaults.buildfeatures.buildconfig=true android.minSdk=21 +android.compileSdk=34 otel.sdk.version=1.29.0 +bytebuddy.version=1.14.8 version=0.2.0 group=io.opentelemetry.android diff --git a/instrumentation/build.gradle.kts b/instrumentation/build.gradle.kts index 664b3aca7..8898249d3 100644 --- a/instrumentation/build.gradle.kts +++ b/instrumentation/build.gradle.kts @@ -9,7 +9,6 @@ version = project.version.toString().replaceFirst("(-SNAPSHOT)?$".toRegex(), "-a android { namespace = "io.opentelemetry.android" - compileSdk = 34 buildToolsVersion = "34.0.0" defaultConfig { diff --git a/settings.gradle.kts b/settings.gradle.kts index 0bcf751d7..ef1710b6d 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,3 +1,6 @@ rootProject.name = "opentelemetry-android" include(":instrumentation") +include(":auto-instrumentation:okhttp:okhttp-3.0:agent") +include(":auto-instrumentation:okhttp:okhttp-3.0:library") +include(":auto-instrumentation:okhttp:okhttp-3.0:testing")