Skip to content

Commit c341e47

Browse files
authored
Instrumentation installation instructions (#1068)
* Adding crash installation instructions * Adding activity installation instructions * Adding anr installation instructions * Adding fragment installation instructions * Adding network installation instructions * Adding slowrendering installation instructions * Adding startup installation instructions * Adding android-log installation instructions * Adding compose-click installation instructions * Adding okhttp3-websocket installation instructions * Adding sessions installation instructions * Adding view-click installation instructions
1 parent 30c11e3 commit c341e47

13 files changed

Lines changed: 204 additions & 1 deletion

File tree

android-agent/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ dependencies {
2424
api(project(":instrumentation:network"))
2525
api(project(":instrumentation:slowrendering"))
2626
api(project(":instrumentation:startup"))
27+
api(project(":instrumentation:sessions"))
2728

2829
testImplementation(libs.robolectric)
2930
}

instrumentation/activity/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,18 @@ This instrumentation produces the following telemetry:
3737
* `activity.name`: name of activity
3838
* `screen.name`: name of screen
3939
* `last.screen.name`: name of screen, only when span contains the `activityPostResumed` event.
40+
41+
## Installation
42+
43+
This instrumentation comes with the [android agent](../../android-agent) out of the box, so
44+
if you depend on it, you don't need to do anything else to install this instrumentation.
45+
However, if you don't use the agent but instead depend on [core](../../core) directly, you can
46+
manually install this instrumentation by following the steps below.
47+
48+
### Adding dependencies
49+
50+
```kotlin
51+
implementation("io.opentelemetry.android.instrumentation:activity:LATEST_VERSION") // <1>
52+
```
53+
54+
1. You can find the latest version [here](https://central.sonatype.com/artifact/io.opentelemetry.android.instrumentation/activity).

instrumentation/android-log/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,28 @@ This instrumentation produces the following telemetry:
1818
* `android.log.tag`: The tag passed to `android.uti.Log.x`
1919
* `exception.stacktrace` - Optional. See the ([semconv here](https://github.com/open-telemetry/semantic-conventions/blob/727700406f9e6cc3f4e4680a81c4c28f2eb71569/docs/attributes-registry/exception.md#exception-stacktrace)).
2020
* `exception.type` - Optional. See the ([semconv here](https://github.com/open-telemetry/semantic-conventions/blob/727700406f9e6cc3f4e4680a81c4c28f2eb71569/docs/attributes-registry/exception.md#exception-type))
21+
22+
## Installation
23+
24+
### Applying the Byte Buddy plugin
25+
26+
This instrumentation makes use of [Byte Buddy](https://bytebuddy.net/) to do bytecode instrumentation. Because of this, you need
27+
to ensure that your application has the Byte Buddy plugin applied, as shown below.
28+
29+
```kotlin
30+
plugins {
31+
id("net.bytebuddy.byte-buddy-gradle-plugin") version "LATEST_VERSION" // <1>
32+
}
33+
```
34+
35+
1. You can find the latest version [here](https://plugins.gradle.org/plugin/net.bytebuddy.byte-buddy-gradle-plugin).
36+
37+
### Adding dependencies
38+
39+
```kotlin
40+
implementation("io.opentelemetry.android.instrumentation:android-log-library:LATEST_LIBRARY_VERSION") // <1>
41+
byteBuddy("io.opentelemetry.android.instrumentation:android-log-agent:LATEST_AGENT_VERSION") // <2>
42+
```
43+
44+
1. You can find the latest library version [here](https://central.sonatype.com/artifact/io.opentelemetry.android.instrumentation/android-log-library).
45+
2. You can find the latest instrumentation agent version [here](https://central.sonatype.com/artifact/io.opentelemetry.android.instrumentation/android-log-agent).

instrumentation/anr/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,18 @@ This instrumentation produces the following telemetry:
2828

2929
Note: This instrumentation supports additional user-configurable `AttributeExtractors` that
3030
may set additional attributes from the given `StackTraceElement[]`.
31+
32+
## Installation
33+
34+
This instrumentation comes with the [android agent](../../android-agent) out of the box, so
35+
if you depend on it, you don't need to do anything else to install this instrumentation.
36+
However, if you don't use the agent but instead depend on [core](../../core) directly, you can
37+
manually install this instrumentation by following the steps below.
38+
39+
### Adding dependencies
40+
41+
```kotlin
42+
implementation("io.opentelemetry.android.instrumentation:anr:LATEST_VERSION") // <1>
43+
```
44+
45+
1. You can find the latest version [here](https://central.sonatype.com/artifact/io.opentelemetry.android.instrumentation/anr).

instrumentation/compose/click/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,13 @@ This instrumentation produces the following telemetry:
3434
* Description: This event is emitted when the user taps on a composable that is clickable.
3535
* See the [semantic convention definition](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/app/app.md#event-appwidgetclick)
3636
for more details.
37+
38+
## Installation
39+
40+
### Adding dependencies
41+
42+
```kotlin
43+
implementation("io.opentelemetry.android.instrumentation:compose-click:LATEST_VERSION") // <1>
44+
```
45+
46+
1. You can find the latest version [here](https://central.sonatype.com/artifact/io.opentelemetry.android.instrumentation/compose-click).

instrumentation/crash/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,18 @@ This instrumentation produces the following telemetry:
2424

2525
Note: This instrumentation supports additional user-configurable `AttributeExtractors` that
2626
may set additional attributes from the given `CrashDetails` (`Thread` and `Throwable`).
27+
28+
## Installation
29+
30+
This instrumentation comes with the [android agent](../../android-agent) out of the box, so
31+
if you depend on it, you don't need to do anything else to install this instrumentation.
32+
However, if you don't use the agent but instead depend on [core](../../core) directly, you can
33+
manually install this instrumentation by following the steps below.
34+
35+
### Adding dependencies
36+
37+
```kotlin
38+
implementation("io.opentelemetry.android.instrumentation:crash:LATEST_VERSION") // <1>
39+
```
40+
41+
1. You can find the latest version [here](https://central.sonatype.com/artifact/io.opentelemetry.android.instrumentation/crash).

instrumentation/fragment/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,18 @@ This instrumentation produces the following telemetry:
2222
* `fragment.name`: name of fragment
2323
* `screen.name`: name of screen
2424
* `last.screen.name`: name of screen, when span contains the `fragmentResumed` event.
25+
26+
## Installation
27+
28+
This instrumentation comes with the [android agent](../../android-agent) out of the box, so
29+
if you depend on it, you don't need to do anything else to install this instrumentation.
30+
However, if you don't use the agent but instead depend on [core](../../core) directly, you can
31+
manually install this instrumentation by following the steps below.
32+
33+
### Adding dependencies
34+
35+
```kotlin
36+
implementation("io.opentelemetry.android.instrumentation:fragment:LATEST_VERSION") // <1>
37+
```
38+
39+
1. You can find the latest version [here](https://central.sonatype.com/artifact/io.opentelemetry.android.instrumentation/fragment).

instrumentation/network/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,18 @@ This instrumentation produces the following telemetry:
2727

2828
Note: This instrumentation supports additional user-configurable `AttributeExtractors` that
2929
may set additional attributes when given a `CurrentNetwork` instance.
30+
31+
## Installation
32+
33+
This instrumentation comes with the [android agent](../../android-agent) out of the box, so
34+
if you depend on it, you don't need to do anything else to install this instrumentation.
35+
However, if you don't use the agent but instead depend on [core](../../core) directly, you can
36+
manually install this instrumentation by following the steps below.
37+
38+
### Adding dependencies
39+
40+
```kotlin
41+
implementation("io.opentelemetry.android.instrumentation:network:LATEST_VERSION") // <1>
42+
```
43+
44+
1. You can find the latest version [here](https://central.sonatype.com/artifact/io.opentelemetry.android.instrumentation/network).
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Android Instrumentation for OkHttp Websocket version 3.0 and higher
2+
3+
## Status: development
4+
5+
Provides OpenTelemetry instrumentation for [okhttp3 websockets](https://square.github.io/okhttp/3.x/okhttp/okhttp3/WebSocket.html).
6+
7+
## Installation
8+
9+
### Applying the Byte Buddy plugin
10+
11+
This instrumentation makes use of [Byte Buddy](https://bytebuddy.net/) to do bytecode instrumentation. Because of this, you need
12+
to ensure that your application has the Byte Buddy plugin applied, as shown below.
13+
14+
```kotlin
15+
plugins {
16+
id("net.bytebuddy.byte-buddy-gradle-plugin") version "LATEST_VERSION" // <1>
17+
}
18+
```
19+
20+
1. You can find the latest version [here](https://plugins.gradle.org/plugin/net.bytebuddy.byte-buddy-gradle-plugin).
21+
22+
### Adding dependencies
23+
24+
```kotlin
25+
implementation("io.opentelemetry.android.instrumentation:okhttp3-websocket-library:LATEST_LIBRARY_VERSION") // <1>
26+
byteBuddy("io.opentelemetry.android.instrumentation:okhttp3-websocket-agent:LATEST_AGENT_VERSION") // <2>
27+
```
28+
29+
1. You can find the latest library version [here](https://central.sonatype.com/artifact/io.opentelemetry.android.instrumentation/okhttp3-websocket-library).
30+
2. You can find the latest instrumentation agent version [here](https://central.sonatype.com/artifact/io.opentelemetry.android.instrumentation/okhttp3-websocket-agent).

instrumentation/sessions/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,18 @@ for additional details about sessions.
1111

1212
See ["Session Events"](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/session.md#session-events)
1313
for more information about the specific events generated by this instrumentation.
14+
15+
## Installation
16+
17+
This instrumentation comes with the [android agent](../../android-agent) out of the box, so
18+
if you depend on it, you don't need to do anything else to install this instrumentation.
19+
However, if you don't use the agent but instead depend on [core](../../core) directly, you can
20+
manually install this instrumentation by following the steps below.
21+
22+
### Adding dependencies
23+
24+
```kotlin
25+
implementation("io.opentelemetry.android.instrumentation:sessions:LATEST_VERSION") // <1>
26+
```
27+
28+
1. You can find the latest version [here](https://central.sonatype.com/artifact/io.opentelemetry.android.instrumentation/sessions).

0 commit comments

Comments
 (0)