Skip to content

Commit

Permalink
Add default analytics uri (#5607)
Browse files Browse the repository at this point in the history
* [WIP] add default analytics uri

* Enter relayer URI to default config

* Changelog
  • Loading branch information
fm3 authored Jul 12, 2021
1 parent 61ce361 commit b741ea5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
- one for the skeleton mode (similar to the existing move tool).
- one for erasing volume data (similar to right-dragging with the previous brush/trace tool)
- Added colored icons to the status entries in the job list. [#5572](https://github.com/scalableminds/webknossos/pull/5594)
- Back-end side analytics are now sent to events-relay.webknossos.org by default. You can opt out by setting `backendAnalytics.uri` to empty in your config. [5607](https://github.com/scalableminds/webknossos/pull/5607)

### Changed
- Improve error logging for unhandled rejections. [#5575](https://github.com/scalableminds/webknossos/pull/5575)
Expand Down
4 changes: 2 additions & 2 deletions app/models/analytics/AnalyticsService.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ class AnalyticsService @Inject()(rpc: RPC,
}

private def send(analyticsEventJson: JsObject): Fox[Unit] = {
if (wkConf.BackendAnalytics.uri == "" || wkConf.BackendAnalytics.key == "") {
if (wkConf.BackendAnalytics.uri == "") {
if (wkConf.BackendAnalytics.verboseLoggingEnabled) {
logger.info(s"Not sending analytics event, since uri/key is not configured. Event was: $analyticsEventJson")
logger.info(s"Not sending analytics event, since uri is not configured. Event was: $analyticsEventJson")
}
} else {
if (wkConf.BackendAnalytics.verboseLoggingEnabled) {
Expand Down
3 changes: 2 additions & 1 deletion conf/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ slackNotifications {

# Back-end analytics
backendAnalytics {
uri = ""
uri = "https://events-relay.webknossos.org/events"
uri = ${?DEV_WK_ANALYTICS_URI}
key = ""
sessionPause = 30 minutes
verboseLoggingEnabled = false
Expand Down

0 comments on commit b741ea5

Please sign in to comment.