Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce relevant software BOMs to ensure version compatibility #1196

Merged
merged 1 commit into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ android {
}

dependencies {
api(platform(Dependencies.Otel.instrumentationBomAlpha))

implementation(kotlinStdlibJdk8)

//implementation("com.cisco.android:rum-agent:24.4.10-2246")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class HttpURLConnectionFragment : BaseFragment<FragmentHttpUrlConnectionBinding>
* Demonstrates a successful HttpURLConnection GET request
*/
fun successfulGet() {
executeGet("http://httpbin.org/get")
executeGet("https://httpbin.org/get")
showDoneToast("successfulGet")
}

Expand All @@ -82,7 +82,7 @@ class HttpURLConnectionFragment : BaseFragment<FragmentHttpUrlConnectionBinding>
* to end the span. This test covers OPTIONS and TRACE requests too.
*/
fun getWithoutInputStream() {
executeGet("http://httpbin.org/get", false)
executeGet("https://httpbin.org/get", false)
showDoneToast("getWithoutInputStream")
}

Expand All @@ -91,10 +91,10 @@ class HttpURLConnectionFragment : BaseFragment<FragmentHttpUrlConnectionBinding>
* Helps test proper synchronization is achieved in our callback APIs code.
*/
fun fourConcurrentGetRequests() {
executeGet("http://httpbin.org/get")
executeGet("http://google.com")
executeGet("http://android.com")
executeGet("http://httpbin.org/headers")
executeGet("https://httpbin.org/get")
executeGet("https://google.com")
executeGet("https://android.com")
executeGet("https://httpbin.org/headers")
showDoneToast("fourConcurrentGetRequests")
}

Expand All @@ -103,7 +103,7 @@ class HttpURLConnectionFragment : BaseFragment<FragmentHttpUrlConnectionBinding>
* and thereby requiring the harvester thread to end the span.
*/
fun sustainedConnection() {
executeGet("http://httpbin.org/get", false, false)
executeGet("https://httpbin.org/get", false, false)
showDoneToast("sustainedConnection")
}

Expand All @@ -112,7 +112,7 @@ class HttpURLConnectionFragment : BaseFragment<FragmentHttpUrlConnectionBinding>
* and thereby requiring the harvester thread to end the span.
*/
fun stalledRequest() {
executeGet("http://httpbin.org/get", false, true, true)
executeGet("https://httpbin.org/get", false, true, true)
showDoneToast("stalledRequest")
}

Expand Down Expand Up @@ -144,7 +144,7 @@ class HttpURLConnectionFragment : BaseFragment<FragmentHttpUrlConnectionBinding>
*/
fun unSuccessfulGet() {
runOnBackgroundThread {
val connection = URL("http://httpbin.org/status/404").openConnection() as HttpURLConnection
val connection = URL("https://httpbin.org/status/404").openConnection() as HttpURLConnection
try {
val responseCode = connection.responseCode
val responseMessage = connection.responseMessage
Expand All @@ -166,7 +166,7 @@ class HttpURLConnectionFragment : BaseFragment<FragmentHttpUrlConnectionBinding>
*/
fun post() {
runOnBackgroundThread {
val connection = URL("http://httpbin.org/post").openConnection() as HttpURLConnection
val connection = URL("https://httpbin.org/post").openConnection() as HttpURLConnection
connection.doOutput = true
connection.requestMethod = "POST"
try {
Expand Down
38 changes: 16 additions & 22 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -113,28 +113,22 @@ object Dependencies {
}

object Otel {
private const val otelVersion = "1.47.0"
private const val otelSemConvVersion = "1.30.0"
private const val otelSemConvAlphaVersion = "$otelSemConvVersion-alpha"
private const val otelInstrumentationVersion = "1.32.0"
private const val otelInstrumentationAlphaVersion = "$otelInstrumentationVersion-alpha"
public const val otelAndroidVersion = "0.10.0-alpha"

const val api = "io.opentelemetry:opentelemetry-api:$otelVersion"
const val context = "io.opentelemetry:opentelemetry-context:$otelVersion"
const val sdk = "io.opentelemetry:opentelemetry-sdk:$otelVersion"
const val exporterOtlpCommon = "io.opentelemetry:opentelemetry-exporter-otlp-common:$otelVersion"
const val exporterOtlp = "io.opentelemetry:opentelemetry-exporter-otlp:$otelVersion"
const val semConv = "io.opentelemetry.semconv:opentelemetry-semconv:$otelSemConvVersion"
const val semConvIncubating = "io.opentelemetry.semconv:opentelemetry-semconv-incubating:$otelSemConvAlphaVersion"

const val instrumentationSemConv = "io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-semconv:$otelInstrumentationAlphaVersion"
const val instrumentationApi = "io.opentelemetry.instrumentation:opentelemetry-instrumentation-api:$otelInstrumentationVersion"
const val instrumentationOkhttp3 = "io.opentelemetry.instrumentation:opentelemetry-okhttp-3.0:$otelInstrumentationAlphaVersion"

const val androidSession = "io.opentelemetry.android:session:$otelAndroidVersion"
const val androidInstrumentation = "io.opentelemetry.android:instrumentation-android-instrumentation:$otelAndroidVersion"
const val androidHttpUrlLibrary = "io.opentelemetry.android:instrumentation-httpurlconnection-library:$otelAndroidVersion"
private const val oTelInstrumentationBomAlpha = "2.13.3-alpha"
const val otelAndroidBomVersion = "0.10.0-alpha"

const val instrumentationBomAlpha = "io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:$oTelInstrumentationBomAlpha"
const val androidBom = "io.opentelemetry.android:opentelemetry-android-bom:$otelAndroidBomVersion"

const val api = "io.opentelemetry:opentelemetry-api"
const val sdk = "io.opentelemetry:opentelemetry-sdk"
const val exporterOtlpCommon = "io.opentelemetry:opentelemetry-exporter-otlp-common"
const val exporterOtlp = "io.opentelemetry:opentelemetry-exporter-otlp"
const val semConv = "io.opentelemetry.semconv:opentelemetry-semconv"
const val semConvIncubating = "io.opentelemetry.semconv:opentelemetry-semconv-incubating"

const val androidSession = "io.opentelemetry.android:session"
const val androidInstrumentation = "io.opentelemetry.android:instrumentation-android-instrumentation"
const val androidHttpUrlLibrary = "io.opentelemetry.android:instrumentation-httpurlconnection-library"
}

object AndroidTest {
Expand Down
2 changes: 2 additions & 0 deletions common/otel/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ android {
}

dependencies {
api(platform(Dependencies.Otel.instrumentationBomAlpha))

compileOnly(Dependencies.Android.annotation)

implementation(project(":common:storage"))
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/buildtime/plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ java {
tasks.jar {
manifest {
attributes(
"Implementation-Version" to Dependencies.Otel.otelAndroidVersion
"Implementation-Version" to Dependencies.Otel.otelAndroidBomVersion
)
}
metaInf {
Expand Down
1 change: 1 addition & 0 deletions instrumentation/runtime/customtracking/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ android {
}

dependencies {
api(platform(Dependencies.Otel.instrumentationBomAlpha))
api(Dependencies.Otel.api)
implementation(project(":integration:agent:api"))
implementation(project(":common:otel"))
Expand Down
2 changes: 2 additions & 0 deletions integration/agent/api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ android {
}

dependencies {
api(platform(Dependencies.Otel.instrumentationBomAlpha))

api(project(":common:otel"))
api(project(":integration:agent:module"))

Expand Down
2 changes: 2 additions & 0 deletions integration/agent/internal/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ android {
}

dependencies {
api(platform(Dependencies.Otel.androidBom))

api(project(":integration:agent:module"))

implementation(project(":common:otel"))
Expand Down
2 changes: 2 additions & 0 deletions integration/anr/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ android {
}

dependencies {
api(platform(Dependencies.Otel.androidBom))

implementation(project(":integration:agent:internal"))

implementation(Dependencies.Otel.androidInstrumentation)
Expand Down
2 changes: 2 additions & 0 deletions integration/crash/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ android {
}

dependencies {
api(platform(Dependencies.Otel.androidBom))

implementation(project(":integration:agent:internal"))

implementation(Dependencies.Otel.androidInstrumentation)
Expand Down
2 changes: 2 additions & 0 deletions integration/interactions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ android {
}

dependencies {
api(platform(Dependencies.Otel.androidBom))

implementation(project(":common:otel"))
implementation(project(":integration:agent:internal"))

Expand Down
2 changes: 2 additions & 0 deletions integration/navigation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ android {
}

dependencies {
api(platform(Dependencies.Otel.androidBom))

implementation(project(":integration:agent:internal"))
implementation(project(":integration:agent:api"))
implementation(project(":common:otel"))
Expand Down
2 changes: 2 additions & 0 deletions integration/networkrequest/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ android {
}

dependencies {
api(platform(Dependencies.Otel.androidBom))

implementation(project(":integration:agent:internal"))

implementation(Dependencies.Otel.androidHttpUrlLibrary)
Expand Down
2 changes: 2 additions & 0 deletions integration/sessionreplay/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ android {
}

dependencies {
api(platform(Dependencies.Otel.androidBom))

implementation(project(":integration:agent:api"))
implementation(project(":integration:agent:internal"))

Expand Down
2 changes: 2 additions & 0 deletions integration/startup/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ android {
}

dependencies {
api(platform(Dependencies.Otel.androidBom))

implementation(project(":integration:agent:internal"))
implementation(project(":instrumentation:runtime:startup"))
implementation(project(":common:otel"))
Expand Down