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

Android and Android TV Monitoring Formatting Edit #966

Merged
merged 4 commits into from
Jul 20, 2022
Merged
Changes from 1 commit
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
39 changes: 20 additions & 19 deletions docs/rum_getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,9 @@ public class SampleApplication extends Application {
{{< /tabs >}}
{{< /site-region >}}

The credentials for initialization require your application's variant name and uses the value of `BuildConfig.FLAVOR` or an empty string if you don't have variants. This enables the correct ProGuard `mapping.txt` file to automatically upload at build time so you can view de-obfuscated RUM error stack traces. For more information, see the [guide to uploading Android source mapping files][8].
The initialization credentials require your application's variant name and uses the value of `BuildConfig.FLAVOR`. If you do not have variants, the credentials uses an empty string.

This enables the appropriate ProGuard `mapping.txt` file to automatically upload at build time so you can view deobfuscated RUM error stack traces. For more information, see the [Track Android Errors][8].

### Initialize the RUM Monitor and Interceptor

Expand All @@ -300,8 +302,8 @@ GlobalRum.registerIfAbsent(monitor)
{{% /tab %}}
{{% tab "Java" %}}
```java
final RumMonitor monitor = new RumMonitor.Builder().build();
GlobalRum.registerIfAbsent(monitor);
final RumMonitor monitor = new RumMonitor.Builder().build();
GlobalRum.registerIfAbsent(monitor);
```
{{% /tab %}}
{{< /tabs >}}
Expand All @@ -311,16 +313,16 @@ To track your OkHttp requests as resources, add the provided [Interceptor][9]:
{{< tabs >}}
{{% tab "Kotlin" %}}
```kotlin
val okHttpClient = OkHttpClient.Builder()
.addInterceptor(DatadogInterceptor())
.build()
val okHttpClient = OkHttpClient.Builder()
.addInterceptor(DatadogInterceptor())
.build()
```
{{% /tab %}}
{{% tab "Java" %}}
```java
final OkHttpClient okHttpClient = new OkHttpClient.Builder()
.addInterceptor(new DatadogInterceptor())
.build();
final OkHttpClient okHttpClient = new OkHttpClient.Builder()
.addInterceptor(new DatadogInterceptor())
.build();
```
{{% /tab %}}
{{< /tabs >}}
Expand All @@ -337,17 +339,16 @@ You can track events such as crashes and network requests when your application

Add the following snippet during initialization in your Datadog configuration:

{{< tabs >}}
{{< tabs >}}
{{% tab "Kotlin" %}}
```kotlin
.trackBackgroundRumEvents(true)
```
```kotlin
.trackBackgroundRumEvents(true)
```
{{% /tab %}}
{{% tab "Java" %}}
```java
.trackBackgroundRumEvents(true)

```
{{% tab "Java" %}}
```java
.trackBackgroundRumEvents(true)
```
{{% /tab %}}
{{< /tabs >}}
<div class="alert alert-info"><p>Tracking background events may lead to additional sessions, which can impact billing. For questions, <a href="https://docs.datadoghq.com/help/">contact Datadog support.</a></p>
Expand All @@ -371,4 +372,4 @@ Add the following snippet during initialization in your Datadog configuration:
[11]: https://docs.datadoghq.com/real_user_monitoring/android/advanced_configuration/#automatically-track-network-requests
[12]: https://github.com/DataDog/dd-sdk-android-gradle-plugin
[13]: https://docs.datadoghq.com/real_user_monitoring/android/web_view_tracking/
[14]: https://docs.datadoghq.com/getting_started/tagging/using_tags/#rum--session-replay
[14]: https://docs.datadoghq.com/getting_started/tagging/using_tags/#rum--session-replay