add skip trace methods for track events & stop default interactions in newrelic

This commit is contained in:
Sai Ram Kotha
2022-05-17 11:22:50 +05:30
parent cdc716b581
commit 59879dd218
3 changed files with 8 additions and 2 deletions

View File

@@ -19,7 +19,7 @@ object FirebaseRemoteConfigHelper {
private lateinit var remoteConfig: FirebaseRemoteConfig
const val LOGIN_PAGE = "LOGIN_PAGE"
const val NEWRELIC_ENABLED = "NEWRELIC_ENABLED"
const val NEWRELIC_ENABLED = "NEWRELIC_ENABLED_V2"
const val CONFIG_SYNC_INTERVAL: Long = 60 * 60
const val RAGE_TAP_COUNT = "RAGE_TAP_COUNT"
const val APP_SPLASH_LOGO = "APP_SPLASH_LOGO"

View File

@@ -7,6 +7,7 @@
package com.navi.analytics.newrelic
import android.content.Context
import com.newrelic.agent.android.FeatureFlag
import com.newrelic.agent.android.NewRelic
import timber.log.Timber
@@ -47,8 +48,8 @@ object NewRelicUtil {
this.isNewRelicEnabled = isNewRelicEnabled
if (isNewRelicEnabled) {
try {
NewRelic.disableFeature(FeatureFlag.DefaultInteractions)
NewRelic.withApplicationToken(token)
.withDefaultInteractions(true)
.withLoggingEnabled(true)
.withCrashReportingEnabled(false)
.start(context)

View File

@@ -21,6 +21,7 @@ import com.navi.pulse.PulseHelper
import com.navi.pulse.PulseSDKConfig
import com.navi.pulse.util.PulseConstants.FIELD_DEVICE_ID
import com.navi.pulse.util.PulseConstants.FIELD_APP_INSTALLER
import com.newrelic.agent.android.instrumentation.SkipTrace
import timber.log.Timber
object NaviTrackEvent {
@@ -63,6 +64,7 @@ object NaviTrackEvent {
}
}
@SkipTrace
fun trackEvent(
eventName: String,
isNeededForAppsflyer: Boolean = true
@@ -70,6 +72,7 @@ object NaviTrackEvent {
trackEvent(eventName, null, isNeededForAppsflyer)
}
@SkipTrace
fun trackEvent(
eventName: String,
eventValues: Map<String, String>? = null,
@@ -88,6 +91,7 @@ object NaviTrackEvent {
Timber.d(eventName.plus(" ").plus(eventValues?.toString()))
}
@SkipTrace
fun trackEventOnClickStream(
eventName: String,
eventValues: Map<String, String>? = null
@@ -96,6 +100,7 @@ object NaviTrackEvent {
Timber.d(eventName.plus(" ").plus(eventValues?.toString()))
}
@SkipTrace
fun trackEventOnAllThirdParty(
eventName: String,
eventValues: Map<String, String>? = null