File tree Expand file tree Collapse file tree
opentelemetry-android-bom Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,13 +37,18 @@ channel in the [CNCF slack](https://slack.cncf.io/). Please join us there for fu
3737
3838## Gradle
3939
40- To use this android instrumentation library in your application, first add a dependency
41- in your gradle build script:
40+ To use this android instrumentation library in your application, you will first need to add
41+ a dependency in your application's ` build.gradle.kts ` . We publish a bill of materials (BOM) that
42+ helps to coordinate versions of the opentelemetry-android components and the upstream
43+ ` opentelemetry-java-instrumentation ` and ` opentelemetry-java ` dependencies. We recommend
44+ using the bom as a platform dependency, and then omitting explicit version information
45+ from all other opentelemetry dependencies:
4246
4347``` kotlin
4448dependencies {
4549 // ...
46- implementation(" io.opentelemetry.android:android-agent:0.12.0-alpha" )
50+ api(platform(" io.opentelemetry.android:opentelemetry-android-bom.12.0-alpha" ))
51+ implementation(" io.opentelemetry.android:android-agent" ) // Version is resolved thru bom
4752 // ...
4853}
4954```
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ compose = "1.5.4"
1919[libraries ]
2020opentelemetry-platform-alpha = { module = " io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha" , version.ref = " opentelemetry-instrumentation-alpha" }
2121opentelemetry-platform = { module = " io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom" }
22+ opentelemetry-core-bom = { module = " io.opentelemetry:opentelemetry-bom" }
2223androidx-navigation-fragment = { group = " androidx.navigation" , name = " navigation-fragment" , version.ref = " androidx-navigation" }
2324androidx-navigation-runtime-ktx = { group = " androidx.navigation" , name = " navigation-runtime-ktx" , version.ref = " androidx-navigation" }
2425androidx-core = " androidx.core:core:1.16.0"
Original file line number Diff line number Diff line change @@ -5,7 +5,12 @@ plugins {
55
66description = " OpenTelemetry Android Bill of Materials"
77
8+ javaPlatform.allowDependencies()
9+
810dependencies {
11+ api(platform(libs.opentelemetry.platform.alpha))
12+ api(platform(libs.opentelemetry.platform))
13+ api(platform(libs.opentelemetry.core.bom))
914 constraints {
1015 rootProject.subprojects.forEach { subproject ->
1116 if (subproject != project) {
You can’t perform that action at this time.
0 commit comments