From 83546466a6206ed6b908e3aa6e3c5fb7373938f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=E2=89=A1ZRS?= <12814349+LZRS@users.noreply.github.com> Date: Fri, 3 Mar 2023 11:51:31 +0300 Subject: [PATCH] Fix README.md codacy lint issues --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 00aca336a..9f1d333cc 100644 --- a/README.md +++ b/README.md @@ -2226,13 +2226,16 @@ For a form named `example_form` the generated assets will follow the following n The properties file can then be copied over to the `resources` folder of your Android project under `src/main`. The placeholder-injected JsonForm will typically be copied over to the `assets` folder of your Android project (although not mandatory). # How to use Sentry for OpenSRP Client Performance Monitoring + This section explains how to setup performance monitoring with Sentry on opensrp clients if you have added opensrp-native-forms library as a dependency. Instructions are given in this article on how to initialize Sentry in the opensrp client apps and how to check for the performance data or transactions on the Sentry dashboard. -##### Note -* You need to have already setup a [project](https://docs.sentry.io/product/sentry-basics/integrate-frontend/create-new-project/) and dashboard with the necessary access permissions, and -* are able to obtain the dsn of this project through [Project] > Settings > Client Keys (DSN). This will be required later for configuration and logging. +> ## Note +> +> * You need to have already setup a [project](https://docs.sentry.io/product/sentry-basics/integrate-frontend/create-new-project/) and dashboard with the necessary access permissions, and +> * are able to obtain the dsn of this project through `[Project] > Settings > Client Keys (DSN)`. This will be required later for configuration and logging. + +## Instructions -### Instructions 1. Add and update opensrp-native-forms library to version above v3.0.4-SNAPSHOT 2. Sync and rebuild project to ensure new dependencies are loaded. Sentry would come as dependency to opensrp-native-forms and would load up automatically. Run your application, and confirm no logs are sent to the sentry dashboard 3. There are a couple of configurations that would need to be setup first for logs to. show up to the dashboard. These are: @@ -2240,10 +2243,12 @@ This section explains how to setup performance monitoring with Sentry on opensrp * and Environment; unique name that would be used to tag logs In your app’s Application class, add the following code snippet in onCreate with the placeholder values replaced . Run your application once more In your app’s Application class, add the following code snippet in onCreate with the placeholder values replaced . Run your application once more + ```Java SentryAndroid.init(this, options -> { options.setEnvironment("YOUR_ENVIRONMENT_NAME"); options.setDsn("YOUR_DSN_NAME_LINK"); }) ``` + 4. Logs in performance monitoring should show up in the Sentry dashboard. Use the Environment tag set from the previous step to filter environment.