What is Sentry?
Sentry is a self-hosted and cloud-based error monitoring service that allows all software
developers and teams to discover, sort, and prioritize errors in real-time.
Furthermore, it allows users to understand the context that contributed to errors with tags and relevant information. It supports and tracks errors in over 17 languages and 29 frameworks for Web Applications.
Why use Sentry?
Many of the bugs that come from the developers tend to be shipped to production. With Sentry, it is possible to find those bugs before the customers even notice the problem.
It allows you to navigate your issues across multiple projects in a single view. You can also view all Issues across your entire organization, or select a handful of related projects to precisely identify and make the trouble spots visible.
Sentry’s added context and Breadcrumbs include the event history and actions that led up to every bug so that debugging the errors can be minimized greatly. It not only allows you to view the specific commit that caused the error which can be resolved in the next release but also automatically assign new issues to the developer or the team that is best suited to tackle that type of issue.
You can also view the frequency, scope and impact of the errors to better understand how your bugs affect your development through a dashboard.
Since SDK v3.21 we have upgraded to Sentry 5 which adds the possibility of a seamless integration and avoid usage collisions.
How to Integrate Streamroot SDK (3.21) with Sentry (5)
In order to make use of the Streamroot SDK while being integrated with Sentry, it is important to make sure that the main application is already implementing and fully integrated with Sentry before setting up the Streamroot SDK. This is important to avoid collisions in the Sentry accounts.
Conventionally, a "Scope" and a "Hub" (learn more here) is used in Sentry to dissociate usage from Streamroot. Adding a Hub allows Streamroot SDK to take up a specific route to send the crash logs and events and avoid collision with other existing Sentry integrations within the application thereby avoiding collisions between multiple Sentry integrations in a single application.
Since Streamroot SDK 3.21, it is now possible to toggle Hub and the classic Sentry implementation from Sentry 5. The Streamroot SDK will now fall back on a custom implementation based on Sentry Hubs.
To integrate successfully, a new field has been introduced in the Mesh Delivery Client Builder useSentryHub(true).
In order to integrate Streamroot SDK (when Sentry has already been implemented), you can follow the steps:
- Go to section iOS/tvOS Players in our Knowledge Base and choose the player you want to integrate with.
- Follow the instructions for your player on the page.
- In the "Build and start the Mesh Delivery Client" (See example), introduce the new field
useSentryHub(true)
useSentryHub(true) |
useSentryHub(false) |
Setting this value to "True" will enable the use of the Sentry Hub. This will dissociate the usage of multiple Sentry Integrations to a single application thus avoiding collisions. | Setting this value to "False" implements the classic Sentry usage without the Sentry Hub. This could result in collisions resulting from Sentry usage if there are other Sentry integrations associated with the application. |
Example
do {
dnaClient = try DNAClient.builder()
.dnaClientDelegate(self)
.latency(30)
.streamrootKey(#streamrootKey#)
.useSentryHub(true)
.start(manifestUrl)
} catch let error {
print("\(error)")
}
Parameter Name | Mandatory | Description |
---|---|---|
manifestUrl | Yes | The HLS .m3u8 master playlist URL needed to be passed to the dnaClient |
latency | Yes | The delay between the playback time and the live edge. To get the best offload capacity, we recommend setting 30s. |
streamrootKey | Yes | The unique Streamroot key that we have assigned to you; make sure it is identical to the one provided in the Account section of your dashboard. |
useSentryHub | No | This allows you to toggle between the Classic Sentry Implementation and the Sentry Hub.The default value is set to "False". |