TelemetryDeck / KotlinSDK

Kotlin SDK for TelemetryDeck, a privacy-conscious analytics service for apps and websites.
Other
7 stars 6 forks source link

Unable to disable automatic signals #6

Closed winsmith closed 2 years ago

winsmith commented 2 years ago

A customer found that even passing an empty list as providers causes unwanted signals to be sent to TelemetryDeck.

Screenshot

kkostov commented 2 years ago

@winsmith is it known which type of signals are causing the problem?

In the screenshot we see that an instance of SessionProvider is added to the list. By default, the NewSessionBegan signals will be sent automatically by SessionProvider. If this is not desired, the SessionProvider can be skipped e.g.:

val providers = listOf(EnvironmentMetadataProvider())
val builder = TelemetryManager.Builder()
  .appID("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")
  .showDebugLogs(true)
  .providers(providers)

TelemetryManager.start(application, builder)

To also disable enrichment of signals, one can also pass a completely empty list:

val builder = TelemetryManager.Builder()
  .appID("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")
  .showDebugLogs(true)
  .providers(emptyList())

TelemetryManager.start(application, builder)
winsmith commented 2 years ago

The problem was with the manifest file