-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
@@ -30,10 +30,20 @@ public static void initialize() { | |||
} | |||
|
|||
private static class EventsHolder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we rename this one to TelemetryHolder
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should expose the updateDebugLoggingEnabled
and updateSessionIdRotationInterval
methods to developers.
} | ||
|
||
static MapboxTelemetry obtainTelemetry() { | ||
return EventsHolder.INSTANCE.telemetry; | ||
} | ||
|
||
public static void enable(){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be package private because we're currently giving the option to opt in through the AttributionDialogManager
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is for opt'ing out as an end user, not the developer, the previous telem integration provided a way to disable telem programmatically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capturing from internal convo that disabling can be done through a manifest tag, will remove the api.
EventsHolder.INSTANCE.telemetry.enable(); | ||
} | ||
|
||
public static void disable() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be package private because we're currently giving the option to opt out through the AttributionDialogManager
.
e274ff1
to
318db23
Compare
@@ -46,7 +46,8 @@ public static synchronized Mapbox getInstance(@NonNull Context context, @NonNull | |||
Context appContext = context.getApplicationContext(); | |||
INSTANCE = new Mapbox(appContext, accessToken); | |||
|
|||
Events.initialize(); | |||
Telemetry.initialize(); | |||
Telemetry.updateDebugLoggingEnabled(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we enabling logging by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should have gone into the testapp not the sdk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean? This is the SDK 🤔
import com.mapbox.android.telemetry.TelemetryEnabler; | ||
import com.mapbox.mapboxsdk.BuildConfig; | ||
import com.mapbox.mapboxsdk.Mapbox; | ||
|
||
public class Events { | ||
public class Telemetry { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, why did we change the class name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Events doesn't expose the purpose of the class in context of the Maps sdk, it's too generic, Telemetry is clear and straightforward.
318db23
to
b10157a
Compare
Closes #11493