Skip to content

Commit 3b240ed

Browse files
committed
feat(Remote Config) added configuration to EndpointConfiguration
1 parent 77c9440 commit 3b240ed

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

bugsnag-android-core/api/bugsnag-android-core.api

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,10 @@ public final class com/bugsnag/android/EndpointConfiguration {
321321
public fun <init> ()V
322322
public fun <init> (Ljava/lang/String;Ljava/lang/String;)V
323323
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
324+
public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
325+
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
324326
public fun equals (Ljava/lang/Object;)Z
327+
public final fun getConfiguration ()Ljava/lang/String;
325328
public final fun getNotify ()Ljava/lang/String;
326329
public final fun getSessions ()Ljava/lang/String;
327330
public fun hashCode ()I

bugsnag-android-core/src/main/java/com/bugsnag/android/EndpointConfiguration.kt

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
package com.bugsnag.android
22

3+
private const val NOTIFY_ENDPOINT = "https://notify.bugsnag.com"
4+
private const val SESSIONS_ENDPOINT = "https://sessions.bugsnag.com"
5+
private const val CONFIGURATION_ENDPOINT = "https://config.bugsnag.com/error-config"
6+
37
/**
48
* Set the endpoints to send data to. By default we'll send error reports to
59
* https://notify.bugsnag.com, and sessions to https://sessions.bugsnag.com, but you can
@@ -10,13 +14,24 @@ class EndpointConfiguration(
1014
/**
1115
* Configures the endpoint to which events should be sent
1216
*/
13-
val notify: String = "https://notify.bugsnag.com",
17+
val notify: String = NOTIFY_ENDPOINT,
1418

1519
/**
1620
* Configures the endpoint to which sessions should be sent
1721
*/
18-
val sessions: String = "https://sessions.bugsnag.com"
22+
val sessions: String = SESSIONS_ENDPOINT,
23+
24+
/**
25+
* Configures the endpoint to retrieve configuration from
26+
*/
27+
val configuration: String? = CONFIGURATION_ENDPOINT
1928
) {
29+
30+
constructor(
31+
notify: String = NOTIFY_ENDPOINT,
32+
sessions: String = SESSIONS_ENDPOINT
33+
) : this(notify, sessions, null)
34+
2035
override fun equals(other: Any?): Boolean {
2136
if (this === other) return true
2237
if (javaClass != other?.javaClass) return false

0 commit comments

Comments
 (0)