Skip to content

Commit f3ac478

Browse files
authored
Introduce relevant software BOMs to ensure version compatibility (#1196)
1 parent 0445fce commit f3ac478

File tree

15 files changed

+50
-33
lines changed

15 files changed

+50
-33
lines changed

app/build.gradle.kts

+2
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ android {
6363
}
6464

6565
dependencies {
66+
api(platform(Dependencies.Otel.instrumentationBomAlpha))
67+
6668
implementation(kotlinStdlibJdk8)
6769

6870
//implementation("com.cisco.android:rum-agent:24.4.10-2246")

app/src/main/java/com/splunk/app/ui/httpurlconnection/HttpURLConnectionFragment.kt

+10-10
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class HttpURLConnectionFragment : BaseFragment<FragmentHttpUrlConnectionBinding>
7272
* Demonstrates a successful HttpURLConnection GET request
7373
*/
7474
fun successfulGet() {
75-
executeGet("http://httpbin.org/get")
75+
executeGet("https://httpbin.org/get")
7676
showDoneToast("successfulGet")
7777
}
7878

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

@@ -91,10 +91,10 @@ class HttpURLConnectionFragment : BaseFragment<FragmentHttpUrlConnectionBinding>
9191
* Helps test proper synchronization is achieved in our callback APIs code.
9292
*/
9393
fun fourConcurrentGetRequests() {
94-
executeGet("http://httpbin.org/get")
95-
executeGet("http://google.com")
96-
executeGet("http://android.com")
97-
executeGet("http://httpbin.org/headers")
94+
executeGet("https://httpbin.org/get")
95+
executeGet("https://google.com")
96+
executeGet("https://android.com")
97+
executeGet("https://httpbin.org/headers")
9898
showDoneToast("fourConcurrentGetRequests")
9999
}
100100

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

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

@@ -144,7 +144,7 @@ class HttpURLConnectionFragment : BaseFragment<FragmentHttpUrlConnectionBinding>
144144
*/
145145
fun unSuccessfulGet() {
146146
runOnBackgroundThread {
147-
val connection = URL("http://httpbin.org/status/404").openConnection() as HttpURLConnection
147+
val connection = URL("https://httpbin.org/status/404").openConnection() as HttpURLConnection
148148
try {
149149
val responseCode = connection.responseCode
150150
val responseMessage = connection.responseMessage
@@ -166,7 +166,7 @@ class HttpURLConnectionFragment : BaseFragment<FragmentHttpUrlConnectionBinding>
166166
*/
167167
fun post() {
168168
runOnBackgroundThread {
169-
val connection = URL("http://httpbin.org/post").openConnection() as HttpURLConnection
169+
val connection = URL("https://httpbin.org/post").openConnection() as HttpURLConnection
170170
connection.doOutput = true
171171
connection.requestMethod = "POST"
172172
try {

buildSrc/src/main/kotlin/Dependencies.kt

+16-22
Original file line numberDiff line numberDiff line change
@@ -113,28 +113,22 @@ object Dependencies {
113113
}
114114

115115
object Otel {
116-
private const val otelVersion = "1.47.0"
117-
private const val otelSemConvVersion = "1.30.0"
118-
private const val otelSemConvAlphaVersion = "$otelSemConvVersion-alpha"
119-
private const val otelInstrumentationVersion = "1.32.0"
120-
private const val otelInstrumentationAlphaVersion = "$otelInstrumentationVersion-alpha"
121-
public const val otelAndroidVersion = "0.10.0-alpha"
122-
123-
const val api = "io.opentelemetry:opentelemetry-api:$otelVersion"
124-
const val context = "io.opentelemetry:opentelemetry-context:$otelVersion"
125-
const val sdk = "io.opentelemetry:opentelemetry-sdk:$otelVersion"
126-
const val exporterOtlpCommon = "io.opentelemetry:opentelemetry-exporter-otlp-common:$otelVersion"
127-
const val exporterOtlp = "io.opentelemetry:opentelemetry-exporter-otlp:$otelVersion"
128-
const val semConv = "io.opentelemetry.semconv:opentelemetry-semconv:$otelSemConvVersion"
129-
const val semConvIncubating = "io.opentelemetry.semconv:opentelemetry-semconv-incubating:$otelSemConvAlphaVersion"
130-
131-
const val instrumentationSemConv = "io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-semconv:$otelInstrumentationAlphaVersion"
132-
const val instrumentationApi = "io.opentelemetry.instrumentation:opentelemetry-instrumentation-api:$otelInstrumentationVersion"
133-
const val instrumentationOkhttp3 = "io.opentelemetry.instrumentation:opentelemetry-okhttp-3.0:$otelInstrumentationAlphaVersion"
134-
135-
const val androidSession = "io.opentelemetry.android:session:$otelAndroidVersion"
136-
const val androidInstrumentation = "io.opentelemetry.android:instrumentation-android-instrumentation:$otelAndroidVersion"
137-
const val androidHttpUrlLibrary = "io.opentelemetry.android:instrumentation-httpurlconnection-library:$otelAndroidVersion"
116+
private const val oTelInstrumentationBomAlpha = "2.13.3-alpha"
117+
const val otelAndroidBomVersion = "0.10.0-alpha"
118+
119+
const val instrumentationBomAlpha = "io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:$oTelInstrumentationBomAlpha"
120+
const val androidBom = "io.opentelemetry.android:opentelemetry-android-bom:$otelAndroidBomVersion"
121+
122+
const val api = "io.opentelemetry:opentelemetry-api"
123+
const val sdk = "io.opentelemetry:opentelemetry-sdk"
124+
const val exporterOtlpCommon = "io.opentelemetry:opentelemetry-exporter-otlp-common"
125+
const val exporterOtlp = "io.opentelemetry:opentelemetry-exporter-otlp"
126+
const val semConv = "io.opentelemetry.semconv:opentelemetry-semconv"
127+
const val semConvIncubating = "io.opentelemetry.semconv:opentelemetry-semconv-incubating"
128+
129+
const val androidSession = "io.opentelemetry.android:session"
130+
const val androidInstrumentation = "io.opentelemetry.android:instrumentation-android-instrumentation"
131+
const val androidHttpUrlLibrary = "io.opentelemetry.android:instrumentation-httpurlconnection-library"
138132
}
139133

140134
object AndroidTest {

common/otel/build.gradle.kts

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ android {
2424
}
2525

2626
dependencies {
27+
api(platform(Dependencies.Otel.instrumentationBomAlpha))
28+
2729
compileOnly(Dependencies.Android.annotation)
2830

2931
implementation(project(":common:storage"))

instrumentation/buildtime/plugin/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ java {
3434
tasks.jar {
3535
manifest {
3636
attributes(
37-
"Implementation-Version" to Dependencies.Otel.otelAndroidVersion
37+
"Implementation-Version" to Dependencies.Otel.otelAndroidBomVersion
3838
)
3939
}
4040
metaInf {

instrumentation/runtime/customtracking/build.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ android {
2424
}
2525

2626
dependencies {
27+
api(platform(Dependencies.Otel.instrumentationBomAlpha))
2728
api(Dependencies.Otel.api)
2829
implementation(project(":integration:agent:api"))
2930
implementation(project(":common:otel"))

integration/agent/api/build.gradle.kts

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ android {
2424
}
2525

2626
dependencies {
27+
api(platform(Dependencies.Otel.instrumentationBomAlpha))
28+
2729
api(project(":common:otel"))
2830
api(project(":integration:agent:module"))
2931

integration/agent/internal/build.gradle.kts

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ android {
2323
}
2424

2525
dependencies {
26+
api(platform(Dependencies.Otel.androidBom))
27+
2628
api(project(":integration:agent:module"))
2729

2830
implementation(project(":common:otel"))

integration/anr/build.gradle.kts

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ android {
2323
}
2424

2525
dependencies {
26+
api(platform(Dependencies.Otel.androidBom))
27+
2628
implementation(project(":integration:agent:internal"))
2729

2830
implementation(Dependencies.Otel.androidInstrumentation)

integration/crash/build.gradle.kts

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ android {
2323
}
2424

2525
dependencies {
26+
api(platform(Dependencies.Otel.androidBom))
27+
2628
implementation(project(":integration:agent:internal"))
2729

2830
implementation(Dependencies.Otel.androidInstrumentation)

integration/interactions/build.gradle.kts

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ android {
2323
}
2424

2525
dependencies {
26+
api(platform(Dependencies.Otel.androidBom))
27+
2628
implementation(project(":common:otel"))
2729
implementation(project(":integration:agent:internal"))
2830

integration/navigation/build.gradle.kts

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ android {
2323
}
2424

2525
dependencies {
26+
api(platform(Dependencies.Otel.androidBom))
27+
2628
implementation(project(":integration:agent:internal"))
2729
implementation(project(":integration:agent:api"))
2830
implementation(project(":common:otel"))

integration/networkrequest/build.gradle.kts

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ android {
2323
}
2424

2525
dependencies {
26+
api(platform(Dependencies.Otel.androidBom))
27+
2628
implementation(project(":integration:agent:internal"))
2729

2830
implementation(Dependencies.Otel.androidHttpUrlLibrary)

integration/sessionreplay/build.gradle.kts

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ android {
2323
}
2424

2525
dependencies {
26+
api(platform(Dependencies.Otel.androidBom))
27+
2628
implementation(project(":integration:agent:api"))
2729
implementation(project(":integration:agent:internal"))
2830

integration/startup/build.gradle.kts

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ android {
2323
}
2424

2525
dependencies {
26+
api(platform(Dependencies.Otel.androidBom))
27+
2628
implementation(project(":integration:agent:internal"))
2729
implementation(project(":instrumentation:runtime:startup"))
2830
implementation(project(":common:otel"))

0 commit comments

Comments
 (0)