diff --git a/README.md b/README.md index cc6b93b..b9b7c77 100755 --- a/README.md +++ b/README.md @@ -119,6 +119,54 @@ environment variables. Below is a list of the required configurations. - `BACKEND_TYPE`: The type of backend, either `HAPI` or `GCP`. `HAPI` should be used for most FHIR servers, while `GCP` should be used for GCP FHIR stores. +**Logging** + +The OpenSRP FHIR Gateway uses Sentry to capture exception logs. The Sentry +integration is _optional_ but if you enable it the following environment +variables are required. + +- `SENTRY_DSN` - The Sentry DSN to send event logs to. + [Read more about Sentry DSN here](https://docs.sentry.io/product/sentry-basics/concepts/dsn-explainer/). + (_Leave empty to disable sentry integration_) +- `SENTRY_RELEASE` - The release version of the Gateway you are running _e.g. + v1.0.8_ +- `SENTRY_ENVIRONMENT` - The server environment you are running _e.g. + production_ +- `SENTRY_LOG_LEVEL` - The minimum log level from which you wish to capture + _e.g. error_ + +Note, Sentry can also be configured using an `application.properties` file in +the classpath e.g. + +```.properties +# ../plugins/resources/application.properties + +sentry.dsn= +sentry.logging.minimum-event-level=error +sentry.logging.minimum-breadcrumb-level=debug +sentry.environment= #e.g. production +sentry.release=1.0.8 +``` + +or as JSON data through the `SPRING_APPLICATION_JSON` environment variable e.g. + +```json +{ + "sentry": { + "dsn": "", + "debug": false, + "environment": "staging", + "release": "1.0.8", + "tags": { + "release-name": "OpenSRP FHIR Gateway" + } + } +} +``` + +**Note:** If you want to disable Sentry integration just leave out the +`SENTRY_DSN` configuration. + **Caching** The plugins implementation supports caching for the sync strategy details which @@ -134,6 +182,45 @@ export OPENSRP_CACHE_EXPIRY_SECONDS=30 To disable caching, set the value to `0`. Note, the value provided is in **seconds**. This configuration is _optional_. +**Sync Filter Tags** + +Configurable sync filter tags parameters are now supported using the following +environment variables + +- `CARE_TEAM_TAG_URL` (_Optional_): Filter tag url for CareTeam sync strategy + + ```bash + export CARE_TEAM_TAG_URL=https://smartregister.org/care-team-tag-id + ``` + + If not set, defaults to https://smartregister.org/care-team-tag-id + +- `LOCATION_TAG_URL` (_Optional_): Filter tag url for Location sync strategy + + ```bash + export LOCATION_TAG_URL=https://smartregister.org/location-tag-id + ``` + + If not set, defaults to https://smartregister.org/location-tag-id + +- `ORGANISATION_TAG_URL` (_Optional_): Filter tag url for Organisation sync + strategy + + ```bash + export ORGANISATION_TAG_URL=https://smartregister.org/organisation-tag-id + ``` + + If not set, defaults to https://smartregister.org/organisation-tag-id + +- `RELATED_ENTITY_TAG_URL` (_Optional_): + + ```bash + export RELATED_ENTITY_TAG_URL=https://smartregister.org/related-entity-location-tag-id + ``` + + If not set, defaults to + https://smartregister.org/related-entity-location-tag-id + ### Run project As document on the Info Gateway modules diff --git a/exec/pom.xml b/exec/pom.xml index e7ab228..5471d45 100755 --- a/exec/pom.xml +++ b/exec/pom.xml @@ -4,7 +4,7 @@ org.smartregister opensrp-gateway-plugin - 1.0.6 + 1.0.8 exec @@ -70,7 +70,7 @@ org.smartregister plugins - 1.0.6 + 1.0.8 diff --git a/plugins/pom.xml b/plugins/pom.xml index 172441b..f3e02dc 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -4,7 +4,7 @@ org.smartregister opensrp-gateway-plugin - 1.0.6 + 1.0.8 plugins @@ -48,7 +48,16 @@ 1.0.0-SNAPSHOT compile - + + io.sentry + sentry-logback + 7.6.0 + + + io.sentry + sentry-spring-boot-starter + 7.6.0 + diff --git a/plugins/src/main/resources/application.properties b/plugins/src/main/resources/application.properties new file mode 100644 index 0000000..c657590 --- /dev/null +++ b/plugins/src/main/resources/application.properties @@ -0,0 +1,6 @@ +sentry.dsn= +sentry.logging.minimum-event-level=error +sentry.logging.minimum-breadcrumb-level=debug +sentry.debug=true +sentry.environment=debug.localhost.testing +sentry.release=1.0.8-dev \ No newline at end of file diff --git a/pom.xml b/pom.xml index f7ac465..2a72cee 100755 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ org.smartregister opensrp-gateway-plugin - 1.0.6 + 1.0.8 pom @@ -41,7 +41,6 @@ true - com.diffplug.spotless spotless-maven-plugin