Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Expose public API Telemetry #11503

Merged
merged 1 commit into from
Mar 22, 2018
Merged

Expose public API Telemetry #11503

merged 1 commit into from
Mar 22, 2018

Conversation

tobrun
Copy link
Member

@tobrun tobrun commented Mar 22, 2018

Closes #11493

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Mar 22, 2018
@tobrun tobrun added this to the android-v6.0.0 milestone Mar 22, 2018
@tobrun tobrun self-assigned this Mar 22, 2018
LukasPaczos
LukasPaczos previously approved these changes Mar 22, 2018
@@ -30,10 +30,20 @@ public static void initialize() {
}

private static class EventsHolder {
Copy link
Member

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?

Copy link
Contributor

@Guardiola31337 Guardiola31337 left a 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(){
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Member Author

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() {
Copy link
Contributor

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.

@LukasPaczos LukasPaczos dismissed their stale review March 22, 2018 18:34

Wrong context

@tobrun tobrun force-pushed the 11493-telem-public-api branch 2 times, most recently from e274ff1 to 318db23 Compare March 22, 2018 19:05
@@ -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);
Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Contributor

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 {
Copy link
Contributor

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?

Copy link
Member Author

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.

@tobrun tobrun merged commit 1d29f82 into release-boba Mar 22, 2018
@tobrun tobrun deleted the 11493-telem-public-api branch March 22, 2018 21:10
@LukasPaczos LukasPaczos mentioned this pull request Mar 27, 2018
10 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants