Skip to content

Commit

Permalink
Stream: crash at startup if Sentry DSN is not correct (close #399)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjben committed Nov 20, 2020
1 parent 562280e commit 9b61f7c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package com.snowplowanalytics.snowplow.enrich.stream

import java.text.SimpleDateFormat
import java.net.URI

import cats.syntax.either._

Expand Down Expand Up @@ -166,7 +167,7 @@ object model {
readTimeout: Option[Long],
url: String
)
final case class SentryConfig(dsn: String)
final case class SentryConfig(dsn: URI)
final case class EnrichConfig(
streams: StreamsConfig,
remoteAdapters: Option[List[RemoteAdapterConfig]],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ abstract class Source(
sentryConfig: Option[SentryConfig]
) {

val sentryClient: Option[SentryClient] = sentryConfig.map(_.dsn).map(Sentry.init)
val sentryClient: Option[SentryClient] = sentryConfig.map(_.dsn.toString).map(Sentry.init)

val MaxRecordSize: Option[Int]

Expand Down

0 comments on commit 9b61f7c

Please sign in to comment.