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

updating docs replacing traces with Root Spans #11

Merged
merged 52 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
bbc5362
Update performance-tracing.md
lomindioladiaz Sep 25, 2024
9962a35
Update tracing.md
lomindioladiaz Sep 27, 2024
64571d0
Update tracing.md
lomindioladiaz Sep 27, 2024
cb56a42
Update tracing.md
lomindioladiaz Sep 27, 2024
464f4e8
Update tracing.md
lomindioladiaz Sep 27, 2024
3fa1823
Update performance-tracing.md
lomindioladiaz Sep 27, 2024
134ee30
Update tracing.md
lomindioladiaz Sep 27, 2024
c47d30a
Update tracing.md
lomindioladiaz Sep 27, 2024
2890eb8
Update tracing.md
lomindioladiaz Sep 27, 2024
c966bf1
Update issue-monitoring-and-work-flow.md
lomindioladiaz Sep 27, 2024
dc00a7f
Add files via upload
lomindioladiaz Oct 7, 2024
1e20c5e
Delete static/images/trace-instance.png
lomindioladiaz Oct 7, 2024
319bf48
Delete static/images/trace-user-timeline.png
lomindioladiaz Oct 7, 2024
eaa0f57
Delete static/images/trace-summary.png
lomindioladiaz Oct 7, 2024
c842ddc
Delete static/images/trace-roots.png
lomindioladiaz Oct 7, 2024
a6f169d
Update performance-tracing.md
lomindioladiaz Oct 7, 2024
35c139e
Update issue-monitoring-and-work-flow.md
lomindioladiaz Oct 7, 2024
0fcb8dd
Merge branch 'main' into root-spans-updates
lomindioladiaz Oct 7, 2024
be8908d
Update tracing.md
lomindioladiaz Oct 7, 2024
3913aed
Update performance-tracing.md
lomindioladiaz Oct 7, 2024
b197ca6
Merge branch 'main' into root-spans-updates
gregorio-gerardi Oct 10, 2024
53e7303
refactor performance tracing to traces
gregorio-gerardi Oct 10, 2024
3b2f807
fix broken links
gregorio-gerardi Oct 10, 2024
87dd3db
Update traces.md
lomindioladiaz Oct 11, 2024
699626e
Update traces.md
lomindioladiaz Oct 11, 2024
3992943
Update traces.md
lomindioladiaz Oct 11, 2024
1ac0104
Update traces.md
lomindioladiaz Oct 11, 2024
4f86424
Update traces.md
lomindioladiaz Oct 11, 2024
27f1cba
Update traces.md
lomindioladiaz Oct 11, 2024
b295e48
Update traces.md
lomindioladiaz Oct 11, 2024
082bb9b
Update traces.md
lomindioladiaz Oct 11, 2024
873ff17
Update traces.md
lomindioladiaz Oct 11, 2024
3738d7c
Update traces.md
lomindioladiaz Oct 11, 2024
05d8157
Update traces.md
lomindioladiaz Oct 11, 2024
9021342
Update traces.md
lomindioladiaz Oct 11, 2024
0e33fc6
Add files via upload
lomindioladiaz Oct 11, 2024
8f8b3ed
Delete static/images/trace-slow-traces.png
lomindioladiaz Oct 11, 2024
742f085
Delete static/images/slow_trace_instances.png
lomindioladiaz Oct 11, 2024
ac11349
Delete static/images/slow_traces_issues_page.png
lomindioladiaz Oct 11, 2024
8af333a
Delete static/images/trace-alerts.png
lomindioladiaz Oct 11, 2024
fc9c73a
Delete static/images/trace-widgets.png
lomindioladiaz Oct 11, 2024
7f69d1b
Update traces.md
lomindioladiaz Oct 11, 2024
e142081
Update traces.md
lomindioladiaz Oct 11, 2024
cc57c8a
Add files via upload
lomindioladiaz Oct 11, 2024
3f6d75f
Update traces.md
lomindioladiaz Oct 11, 2024
d97143b
Add files via upload
lomindioladiaz Oct 11, 2024
79c0356
Update docs/react-native/features/traces.md
lomindioladiaz Oct 11, 2024
0b4bad3
Update docs/react-native/4x/features/traces.md
lomindioladiaz Oct 11, 2024
2fb8b63
Update traces.md
lomindioladiaz Oct 11, 2024
3b33e6e
Update traces.md
lomindioladiaz Oct 11, 2024
6da710a
Update traces.md
lomindioladiaz Oct 11, 2024
68ad992
Merge branch 'main' into root-spans-updates
lomindioladiaz Oct 12, 2024
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
12 changes: 6 additions & 6 deletions docs/android/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ Do not use these versions of the SDK. This issue has been addressed in 6.9.2.
*July 4, 2024*
- OpenTelemetry compatibility improvements:
- Provide implementation of the [OpenTelemetry Tracing API](https://opentelemetry.io/docs/specs/otel/trace/api/).
- Spans recorded through this API and implementation are equivalent to those recorded using the Embrace Performance Tracing API.
- Spans recorded through this API and implementation are equivalent to those recorded using the Embrace Traces API.
- This can be obtained through the `getOpenTelemetry()` method, which will return working implementations for methods involving tracing. Methods involving Logs and Metrics are no-ops at the current time.
- Stopping spans through the Embrace Performance Tracing API no longer implicitly sets Status to `OK`.
- Stopping spans through the Embrace Traces API no longer implicitly sets Status to `OK`.
- Add `telemetry.distro.*` resource attributes to exported signals.
- Update OpenTelemetry SDK dependency to version 1.38 of the [OpenTelemetry BOM](https://github.com/open-telemetry/opentelemetry-java?tab=readme-ov-file#bill-of-material).
- Consume semantic conventions from [OTel Semantic Conventions for Java](https://github.com/open-telemetry/semantic-conventions-java).
- Enhance Performance Tracing API to support behavior exposed via the OpenTelemetry Tracing API.
- Enhance Traces API to support behavior exposed via the OpenTelemetry Tracing API.
- Change internal endpoint to which session data is sent (no user-facing behavior changes).
- Issue build warning for apps that have minSdk < 24 and are using AGP < 8.3.
- If minSdk is lower than 24 (i.e. Android 5 and/or 6 is supported by the app), AGP version 8.3+ must be used so the app can be desugared with the proper setting.
Expand Down Expand Up @@ -141,8 +141,8 @@ API Desugaring is now a requirement for apps that support Android 5 and 6. This

## 6.4.0
*March 6, 2024*
- Performance Tracing improvements
- Support configuration of OpenTelemetry Exporters to export [Performance Tracing](/android/features/tracing/#export-to-opentelemetry-collectors) data as OpenTelemetry Spans (beta).
- Traces improvements
- Support configuration of OpenTelemetry Exporters to export [Traces](/android/features/traces/#export-your-telemetry) data as OpenTelemetry Spans (beta).
- Change timestamps parameters of the APIs to use milliseconds to better align with Android developer expectations.
- Note: timestamps that are in nanoseconds will be detected and converted for now so existing instrumentation will still work, but this will be removed in an upcoming release.
- Increase per-session limit of spans to 500 in total.
Expand Down Expand Up @@ -202,7 +202,7 @@ Gradle 8.4+ is not supported by this version when the NDK crash capture feature

## 6.1.0
*November 24, 2023*
- Enabled [Performance Tracing](/android/features/tracing/) by default
- Enabled [Traces](/android/features/traces/) by default
- Improved build performance of the Gradle plugin
- Improved session data delivery retries
- Enforce network call per session limits properly
Expand Down
2 changes: 1 addition & 1 deletion docs/android/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ This could be due to one of the following reasons:

### **How do I measure operations running in parallel?**

Please refer to [Performance Tracing feature guide](/android/features/tracing) for a reference on how to measure custom app operations using Embrace, including ones running in parallel.
Please refer to [Traces feature guide](/android/features/traces) for a reference on how to measure custom app operations using Embrace, including ones running in parallel.


## Tap Coordinates
Expand Down
2 changes: 1 addition & 1 deletion docs/android/features/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sidebar_position: 2
Embrace's SDK includes many advanced features that you can enable to help you understand more about
how your application is performing in production.

* [**Performance Tracing.**](/android/features/tracing.md) Record traces to monitor the production performance and success rates of operations within your application.
* [**Traces.**](/android/features/traces.md) Record traces to monitor the production performance and success rates of operations within your application.
* [**Breadcrumbs.**](/android/features/breadcrumbs.md) Enrich your sessions with Breadcrumb, a lightweight way to add logging to your session.
* [**Know your users.**](/android/features/identify-users.md) Add your own custom identifiers to users and sessions to make sure you can aggregate and find sessions correctly.
* [**Session Properties.**](/android/features/session-properties.md) Session Properties provide a way to annotate the session with additional information.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
---
title: Performance Tracing
description: Record traces to monitor the production performance and success rates of operations within your mobile app.
title: Traces
description: Record span to monitor the production performance and success rates of operations within your mobile app.
sidebar_position: 2
---

# Performance Tracing
# Traces

## Overview

Embrace’s Performance Tracing solution gives you visibility into any app operation you’d like to track, including duration, success rate, and any contextual metadata collected at runtime that helps debug the root cause of your mobile app's performance issues. With our tool, you can quickly spot any bottlenecks in your app’s architecture, pinpoint areas you need to troubleshoot with high precision, and ultimately deliver a truly optimized user experience.
Embrace’s Traces solution gives you visibility into any app operation you’d like to track, including duration, success rate, and any contextual metadata collected at runtime that helps debug the root cause of your mobile app's performance issues. With our tool, you can quickly spot any bottlenecks in your app’s architecture, pinpoint areas you need to troubleshoot with high precision, and ultimately deliver a truly optimized user experience.

## Feature Support

:::info Minimum Requirements
**We recommend using the latest Android SDK version for the most up-to-date API**. Even though Performance Tracing is enabled in earlier versions as well, they only support a subset of features described in this doc, which applies to versions 6.4.0 and above.
**We recommend using the latest Android SDK version for the most up-to-date API**. Even though Traces is enabled in earlier versions as well, they only support a subset of features described in this doc, which applies to versions 6.4.0 and above.
:::

The Embrace Performance Tracing API allows you to:
The Embrace Traces API allows you to:

- Create real-time performance timers or record data for past operations.
- For real-time tracing, we use a “stopwatch” concept that lets you start and stop a span's recording manually.
Expand All @@ -29,7 +29,7 @@ The Embrace Performance Tracing API allows you to:

There are no limits on the duration of a span as long as the app is running.

There are also no limits to the number of child spans you can have per trace, provided the total number of spans do not exceed the per-session maximum.
There are also no limits to the number of child spans you can have per Root Span, provided the total number of spans does not exceed the per-session maximum.

### Limits

Expand Down Expand Up @@ -57,14 +57,14 @@ If you exceed the listed limits, the operation with the limit-exceeding call wil
The `emb-` and `emb.` prefixes are reserved for internal Embrace span and attribute names, respectively. You should never create a span or attribute key name with `emb-` and `emb.` prefixes
:::

## Adding Performance Traces To Your App
## Adding Traces To Your App

To use this feature:

1. Ensure you’re using a version of the Embrace SDK that supports Performance Tracing.
1. Ensure you’re using a version of the Embrace SDK that supports Traces.
2. (Optional) Enable API desugaring for your app if you want users running Android 5.x and 6.x to report traces.
3. Instrument your app using the reference guide in this section to start adding traces to your operations, or refer to the [API docs](https://embrace-io.github.io/embrace-android-sdk/) for a more comprehensive description of the public API.
4. See the traces in the Traces section of the Embrace dashboard.
3. Instrument your app using the reference guide in this section to start adding spans to your operations, or refer to the [API docs](https://embrace-io.github.io/embrace-android-sdk/) for a more comprehensive description of the public API.
4. See the spans in the Traces section of the Embrace dashboard.

## API Usage Examples

Expand All @@ -79,7 +79,6 @@ import TabItem from '@theme/TabItem';
<TabItem value="kotlin" label="Kotlin">

```kotlin
// create a trace by creating its root span
// recording will not begin until the span has been started
val activityLoad = Embrace.getInstance().createSpan("load-activity")
```
Expand All @@ -88,7 +87,6 @@ val activityLoad = Embrace.getInstance().createSpan("load-activity")
<TabItem value="java" label="Java">

```java
// create a trace by creating its root span
// recording will not begin until the span has been started
EmbraceSpan activityLoad = Embrace.getInstance().createSpan("load-activity");
```
Expand Down Expand Up @@ -127,11 +125,11 @@ EmbraceSpan activityLoad = Embrace.getInstance().startSpan("load-activity");

```kotlin
val appStartTimeMillis = getAppStartTime()
val appLaunchTrace = Embrace.getInstance().createSpan("app-launch")
val appLaunchSpan = Embrace.getInstance().createSpan("app-launch")

// begin recording a trace that has a different start time than
// begin recording a span that has a different start time than
// the current time by starting its root span with a specific timestamp
appLaunchTrace?.start(startTimeMs = appStartTimeMillis)
appLaunchSpan?.start(startTimeMs = appStartTimeMillis)
```

</TabItem>
Expand All @@ -141,7 +139,7 @@ appLaunchTrace?.start(startTimeMs = appStartTimeMillis)
long appStartTimeMillis = getAppStartTime();
EmbraceSpan activityLoad = Embrace.getInstance().createSpan("load-activity");

// begin recording a trace that has a different start time than
// begin recording a span that has a different start time than
// the current time by starting its root span with a specific timestamp
if (activityLoad != null) {
activityLoad.start(appStartTimeMillis);
Expand Down Expand Up @@ -295,7 +293,7 @@ if (activityLoad != null) {
</TabItem>
</Tabs>

### Record a Trace Before the Embrace SDK Has Started
### Record a Span Before the Embrace SDK Has Started

<Tabs groupId="android-language" queryString="android-language">
<TabItem value="kotlin" label="Kotlin">
Expand Down
72 changes: 0 additions & 72 deletions docs/features/performance-tracing.md

This file was deleted.

75 changes: 75 additions & 0 deletions docs/features/traces.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
title: Traces
sidebar_position: 1
---

# Traces

Embrace’s Traces solution gives you visibility into any app operation you’d like to track, including duration, success rate, and any contextual metadata collected at runtime that helps debug the root cause of your mobile app's performance issues. With our tool, you can quickly spot any bottlenecks in your app’s architecture, pinpoint areas you need to troubleshoot with high precision, and ultimately deliver a truly optimized user experience.

## Root Spans View
The primary page shows all root spans in your app, as well as summary metrics like count, error rate, percentiles of duration, and changes from a previous version.

<img src={require('@site/static/images/traces-page.png').default} alt="Traces"/>

To narrow down the spans that are summarized in this view, you can apply the following filters on the root span as well as the child spans:
* Name
* Duration
* Outcome
* Attributes keys and values
* Span event names

## Root Span Summary View
By clicking on the name of a Root Span in the Root Spans View, you can see a partial listing of all the instances of that Root Span.

Each row represents a specific instance of that Root Span being recorded. You can see its status, unique Span ID, and duration, in addition to start and end times. All of these columns other than the Span ID is sortable.

Clicking on the instance will open up an in-line preview of the details of that instance, including the child spans that it has, their duration, and whether they were completed successfully.

On the right side each row that shows a Root Span instance, there are two icons. The first one takes you to the Root Span Instance View, where you can see all the details about that instance, including attributes and events on each child span. The second one takes you to the specific session in the User Timeline view that this instance ended in so you can see the full context of what happened before and after this Root Span was recorded.

<img src={require('@site/static/images/root-span-summary-1.png').default} alt="Root Span summary"/>

You can filter by properties similar to those in the Root Span View.

<img src={require('@site/static/images/root-spans-filters.png').default} alt="Trace summary filters"/>

## Root Span Instance View
This view shows a Root Span in its entirety. Not only can you see all the information in trace instance preview, you can also see at the individual events and attributes recorded as part of on a each child span, along with metadata about the device and app.

<img src={require('@site/static/images/root-span-instance-1.png').default} alt="Trace instance"/>

## User Timeline view
Root Spans appear in both the Timeline View and Timeline Details.

Clicking on "See Details" for any Root Span within the timeline will take you directly to the Root Span Instance View.

<img src={require('@site/static/images/traces-timeline.png').default} alt="User timeline"/>

## Sessions Filters
Not only can you filter spans in the various pages dedicated to Traces, you can filter sessions in the Sessions View by whether or not they contain specific spans with certain attributes and events.

<img src={require('@site/static/images/trace-session-filters.png').default} alt="Session filters"/>

## Boards, Alerts, and Custom Metrics
You can create Boards, Alerts, and Custom Metrics based on span data.

<img src={require('@site/static/images/spans-widgets.png').default} alt="Trace widgets"/>
<img src={require('@site/static/images/spans-alerts.png').default} alt="Trace alerts"/>

## Slow Root Spans
With the Slow Root Spans feature, you can identify performance bottlenecks and prioritize your optimization efforts.
Slow Root Spans are instances with both significant occurrences (100 over the last two days) and durations surpassing the 95th percentile of successful spans bearing the same name.
You can get the slow Root Spans on the issues page.

<img src={require('@site/static/images/slow-root-spans.png').default} alt="Slow traces"/>

Once you click on a Slow Root Span, you can see specific instances of that span.

## Implementation Details
1. [**Android**](/android/features/traces)
2. [**iOS**](/ios/open-source/traces)
3. [**Unity**](/unity/features/traces)
4. [**React Native**](/react-native/features/traces)
5. [**Flutter**](/flutter/features/traces)

Loading