Skip to content

Commit

Permalink
reorganize ios 6 repo, add session reporting and customizing symbols (#…
Browse files Browse the repository at this point in the history
…46)

* reorganize ios 6 repo, add session reporting and customizing symbols

* fix unity link to ios tracing limits

* fix link

* fix rn links to ios

* fix redirect

* reorganize 6x subfolders
  • Loading branch information
davidlawrencer authored Oct 23, 2024
1 parent fc490ed commit fa1b716
Show file tree
Hide file tree
Showing 26 changed files with 230 additions and 42 deletions.
2 changes: 1 addition & 1 deletion docs/features/traces.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ 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)
2. [**iOS**](/ios/open-source/features/traces)
3. [**Unity**](/unity/features/traces)
4. [**React Native**](/react-native/features/traces)
5. [**Flutter**](/flutter/features/traces)
Expand Down
2 changes: 1 addition & 1 deletion docs/flutter/features/traces.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ All telemetry in Embrace's Flutter SDK is routed through Embrace's Android/iOS S
Please follow [this guide](/android/features/traces) to setup OpenTelemetry collectors on Android.

### iOS OTel export
Please follow [this guide](/ios/open-source/otel-exporter) to setup OpenTelemetry collectors on iOS.
Please follow [this guide](/ios/open-source/features/otel-exporter) to setup OpenTelemetry collectors on iOS.

:::info
Please note the OpenTelemetry-Swift repository does not support Cocoapods so you will be unable to import ready-made exporters directly. We recommend adding a new file that implements `SpanExporter` or `LogRecordExporter` directly, and using the ready-made exporters as reference implementations.
Expand Down
4 changes: 2 additions & 2 deletions docs/ios/5x/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_position: 2

# Getting Started

Embrace's 5.x SDK supports both the iOS and the Apple TV platform from a common codebase. All of the API you can use on iOS, is also available on Apple TV. The 5.x SDK is built on Objective-C and is closed-source. It will eventually be replaced by the [6.x SDK](./../open-source/)
Embrace's 5.x SDK supports both the iOS and the Apple TV platform from a common codebase. All of the API you can use on iOS, is also available on Apple TV. The 5.x SDK is built on Objective-C and is closed-source. It is no longer recommended for new and current users, who should upgrade to the [6.x SDK](/ios/open-source/).

This documentation is split into two sections:

Expand All @@ -17,4 +17,4 @@ If you are just starting out with Embrace, follow the [**Integration Guide**](./

Once you've completed that, browse through our [**Feature Reference**](./features/) guides to learn how to use some of the advanced features our SDK provides.

You can also view our [FAQ](/ios/faq/) and [Changelog](/ios/changelog/)
You can also view our [FAQ](/ios/faq/) and [Changelog](/ios/changelog/)
24 changes: 11 additions & 13 deletions docs/ios/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,31 @@ sidebar_position: 0

The Embrace Apple SDK is designed to provide first class observability and diagnostic data collection to your mobile application. It supports multiple platforms including iOS, iPadOS, and tvOS.

## Major Versions Available
## Recommended Major Version - Apple 6.x

Presently there are __two__ major versions of the Apple SDK available: 5 and 6.
Our Apple 6.x SDK is recommended for all current and new customers. The 6.x SDK is our [open-source](https://github.com/embrace-io/embrace-apple-sdk) superset of [OpenTelemetry](https://opentelemetry.io) instrumentation, built in Swift for modern language (such as async/await) and mobile observability (spans, logs) features. It has all the latest Embrace features and semantics, and will continue to grow as Embrace helps expand the OTel ecosystem for mobile.

5.x is our stable, closed-source SDK that has been generally available since the year 2020. 6.x is our open-source SDK that features major enhancements to the previous SDK, and has most of the features that Embrace customers use today.
We recommend that customers use our version 6 SDK, as it contains OTel primitives, open-source support, and better use of modern Swift features like async/await. If you are upgrading from our older 5x SDK, a [migration guide](/docs/ios/open-source/upgrade-guide.md) is available to implement the new features and interface in the 6.x SDK.

Versions 5.x and 6.x are not compatible nor are they interoperable. The 6.x SDK is built on [OpenTelemetry](https://opentelemetry.io), and the features and signals that it provides have different semantics than previous versions. 6.x is also a rewrite of the SDK in the Swift programming language, so it does not include features that we won't support in the future, like Moments.
This documentation reflects information on the 6.x SDK. Current documentation for the 6.x SDK is split into three sections:

A [migration guide](/docs/ios/open-source/upgrade-guide.md) is available to implement the new features and interface in the 6.x SDK. We recommend that customers consider migrating to version 6, as it contains OTel primitives and better support for modern Swift features like async/await.
1. [**Integration Guide**](./open-source/integration/) for open-source SDK developers.
2. [**Getting Started**](./open-source/getting-started/) for users adding Embrace to your project.
3. [**Feature Reference**](./open-source/features/) for more details about Embrace features.

## 6.x SDK Documentation
## 5.x SDK Documentation

This documentation reflects information on the 6.x Open Source SDK. Current documentation for the 6.x SDK can be found in our [**6.x Apple SDK**](/ios/open-source) sections. You can begin your integration by [linking Embrace](/docs//ios/open-source/linking-embrace.md).
Embrace iOS 5.x is the closed-source SDK that has been generally available since the year 2020. It is not available for open-source developers, and is not recommended for new users.

## 5.x SDK Documentation
Versions 5.x and 6.x are not compatible nor are they interoperable. The 6.x SDK is built on [OpenTelemetry](https://opentelemetry.io), and the features and signals that it provides have different semantics and syntax than previous versions. 6.x is also a rewrite of the SDK in the Swift programming language, so it does not include features that Embrace does not intend to support in the future, like Moments.

This documentation reflects information on the 5.x SDK. It is split into two sections:

1. [**Integration Guide**](./5x/integration/)
2. [**Feature Reference**](./5x/features/)

If you are just starting out with Embrace, follow the [**Integration Guide**](./5x/integration/) to learn the key steps to successfully using our product.

Once you've completed that, browse through our [**Feature Reference**](./5x/features/) guides to learn how to use some of the advanced features our SDK provides.

## Any questions

If you would like clarification on which SDK to use, please reach out to us on Slack or email us at [support@embrace.com](mailto:support@embrace.com).
If you would like clarification on which SDK to use, please reach out to us on the [community slack](https://community.embrace.io) or email us at [support@embrace.com](mailto:support@embrace.com).

You can also view our [FAQ](/ios/faq/) and [Changelog](/ios/changelog/)
14 changes: 14 additions & 0 deletions docs/ios/open-source/features/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: 6x Feature Reference
description: Learn about the advanced ways Embrace can help your application
sidebar_position: 4
---

# Apple SDK Reference

The Embrace Apple SDK includes many advanced features that you can enable to help you understand more about how your application is performing in production.

1. [Export your OpenTelemetry traces and logs](/ios/open-source/features/otel-exporter.md) using any compatible OTel Exporter.
1. Measure and prioritize performance in your app using [ Tracing](/ios/open-source/features/traces.md).
1. Dynamically segment users to understand variations and tailor diverse app experiences using [User Personas](/ios/open-source/features/metadata-personas.md).
1. Capture the vitals of any troublesome networking using [Network Body Capture](/ios/open-source/features/network-body-capture.md)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: User Personas
sidebar_position: 9
sidebar_position: 4
---


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Network Body Capture
description: Embrace can capture network body requests and responses
sidebar_position: 4
sidebar_position: 3

---
# Network Body Capture
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: OpenTelemetry Exporter
sidebar_position: 5
sidebar_position: 2
---

# OpenTelemetry Exporter

Because the 6.x iOS SDK is built on OpenTelemetry, it has the ability to export OpenTelemetry signals directly from the mobile code level, without any of the telemetry hitting our backend.

To send traces and logs from the SDK to your collector or vendor of choice, you will need to configure the SDK with an exporter capable of sending OTel signals to that destination. This will be done in the creation of the [`Embrace.Options`](./embrace-options.md), by adding an [`OpenTelemetryExport`](https://github.com/embrace-io/embrace-apple-sdk/blob/main/Sources/EmbraceCore/Public/OpenTelemetryExport.swift).
To send traces and logs from the SDK to your collector or vendor of choice, you will need to configure the SDK with an exporter capable of sending OTel signals to that destination. This will be done in the creation of the [`Embrace.Options`](/ios//open-source/integration/embrace-options.md), by adding an [`OpenTelemetryExport`](https://github.com/embrace-io/embrace-apple-sdk/blob/main/Sources/EmbraceCore/Public/OpenTelemetryExport.swift).

## Direct Exporters

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Traces
description: Record spans to monitor the production performance and success rates of operations.
sidebar_position: 8
sidebar_position: 1
---

# Traces
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Crash Reporting
description: Upload crash reports from your iOS application using the Embrace SDK
sidebar_position: 6
sidebar_position: 1
---

# Crash Reporting
Expand All @@ -14,7 +14,7 @@ Embrace can either use its own internal crash reporting logic or work alongside

The first step in initializing crash reporting is configuring which mode you want Embrace to operate in. Embrace can be your primary crash reporter, or you can add Firebase Crashlytics as the crash reporter to send crashes to both Embrace ~and~ Firebase. If you choose to use Crashlytics, Embrace will mirror reports sent to Crashlytics so you will still have that data available in the Embrace Dashboard.

The crash reporter is added in the [SDK configuration step](/docs/ios//open-source/embrace-options.md). If you do not add another crash reporter, Embrace's will be used by default. If you wish to use Crashlytics, do the following:
The crash reporter is added in the [SDK configuration step](/docs/ios/open-source/integration/embrace-options.md). If you do not add another crash reporter, Embrace's will be used by default. If you wish to use Crashlytics, do the following:

```swift
//import Embrace support module so that Embrace dashboard mirrors Crashlytics data
Expand Down
19 changes: 19 additions & 0 deletions docs/ios/open-source/getting-started/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: Get Started With Embrace
description: Start integrating Embrace into your iOS application
sidebar_position: 3
---

# Get Started With Embrace

Once the Embrace Apple SDK is integrated into your mobile app, you can begin to send mobile signals to the Embrace backend for analysis. This section contains information on what you can expect from our commercial product. These features, such as [session reporting](/ios/open-source/getting-started/session-reporting.md) are also available for open-source users, but without the visualization provided by the Embrace dashboard.

Read on to find out more about:

- Adding [crash reporters](/ios/open-source/getting-started/crash-report.md) to your app.
- Making sense of [sessions](/ios/open-source/getting-started/session-reporting.md) in your app.
- Symbolicating [crash reports and dSYMs](/ios/open-source/getting-started/symbolicating-crash-reports.md) in your app.

## Prerequisites

To link the SDK to your Embrace dashboard, you will need an App ID. Register your app to get an App ID by [logging in to your Embrace Dashboard](/ios/5x/integration/login-embrace-dashboard.md).
23 changes: 23 additions & 0 deletions docs/ios/open-source/getting-started/session-reporting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Session Reporting
description: Upload sessions from your mobile application using the Embrace SDK
sidebar_position: 2
---

# Session Reporting

## Create your first session

Once Embrace is configured and started in your app, it automatically starts capturing user sessions.

A session is any length of user experience that occurs while the app is in the foreground or background. Note that foreground sessions and background sessions behave differently, and so are recorded separately. This means that, for example, opening a push notification from your app will end a foreground session and start a background session.

Sessions are recorded as OTel spans with Attributes and SpanEvents for various app lifecycle, user experience, and device information. Embrace always uploads sessions on subsequent launches or foregrounding/backgroundings of the app.

You can learn more about moments and measuring performance yourself in the
[Moments](/ios/5x/features/moments) section.

## Trigger a session upload to the dashboard

To trigger a session upload, simply send the application to the background by pressing the simulators 'home' button or swipe up, depending on the simulator you're running, or press `Cmd+Shift+H` on your keyboard.
Typically the SDK will be given sufficient time to upload the session, but sometimes the app is not able to complete the upload in the background. To ensure the session was uploaded, launch the application again. Refresh the dashboard in your browser and you should now see that you've moved on to the next step.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Symbolicating Crash Reports
description: Upload your app's desymbolicated files to Embrace for readable stack traces.
sidebar_position: 7
sidebar_position: 3
---

# Symbolicating Crash Reports
Expand Down
16 changes: 12 additions & 4 deletions docs/ios/open-source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,25 @@ sidebar_position: 0

The Embrace 6.x Apple SDK is designed to provide first class observability and diagnostic data collection to your mobile application. It supports multiple platforms including iOS, iPadOS, and tvOS.

## What is in the Embrace Apple SDK?

Embrace's 6.x SDK is open-source and can be found on [GitHub](https://github.com/embrace-io/embrace-apple-sdk/). It has been designed so that any Apple developer can add the SDK to their app and transmit telemetry without using Embrace, or can use Embrace to gain the key mobile insights that we've cultivated in our [product](/docs/product/index.md).

The Embrace Apple SDK is built on OpenTelemetry signals like logs and spans, which allow you to [export the telemetry](/docs/ios/open-source/otel-exporter.md) captured in your app to other sources. We encourage you to add the SDK to your app and view the logs and traces that the SDK automatically captures, with the caveat that we can't guarantee you'll quickly make sense of it all. Embrace 6.x SDK is also built in Swift, which allows us to provide more support for modern language features like async/await.
The Embrace Apple SDK is built on OpenTelemetry signals like logs and spans, which allow you to [export the telemetry](/docs/ios/open-source/features/otel-exporter.md) captured in your app to other sources. We encourage you to add the SDK to your app and view the logs and traces that the SDK automatically captures, with the caveat that we can't guarantee you'll quickly make sense of it all. Embrace 6.x SDK is also built in Swift, which allows us to provide more support for modern language features like async/await.

This documentation is split into three sections:

1. [**Integration Guide**](./integration/) for open-source developers using the Embrace SDK.
2. [**Getting Started**](./getting-started/) for users adding Embrace to your project.
3. [**Feature Reference**](./features/) for more details about Embrace features.

Please note that some prior functionality has been deprecated and that some method names or implementation details may differ. Further details are available in the [migration guide](/docs/ios/open-source/upgrade-guide.md). Please reach out to in the [Community Slack](https://community.embrace.io) if you have any questions.

# Built on OpenTelemetry
## Built on OpenTelemetry

The 6.x iOS SDK has been rearchitected from the foundations to support and extend [OpenTelemetry](https://opentelemetry.io) for mobile. The new modular approach builds the Embrace event-based observability paradigm directly on OpenTelemetry signals, namely, [Traces](https://opentelemetry.io/docs/concepts/signals/traces/) and [Logs](https://opentelemetry.io/docs/concepts/signals/logs/).

## How we built it
### How we built it

As an example, [Sessions](https://embrace.io/product/user-session-insights/) are the core of Embrace's reproduce-and-fix approach to insights. Sessions capture everything that your app is doing while foregrounded or backgrounded, until the user starts or stops using the app. Given that Sessions take place in a given time period, with different related activities occurring in that time, it shouldn't surprise anyone OTel-aware that we model Sessions as a **trace**.

Expand Down Expand Up @@ -82,7 +90,7 @@ class SessionController {

Our engineering and product teams have many ideas about Sessions and how they work within the OTel specification, or rather how they don't work presently. Despite this, we've created the tools to take this Embrace concept of Sessions and export it as opinion-free telemetry in the form of OpenTelemetry spans.

## Events mapped to OTel signals
### Events mapped to OTel signals

If the prior section was too in-depth, here's a handy chart of the important Embrace SDK features and how they currently map to OpenTelemetry signals:

Expand Down
Loading

0 comments on commit fa1b716

Please sign in to comment.