Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
bitsandfoxes committed Feb 20, 2025
1 parent ac7be23 commit 46039a5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,11 @@ static void applyMetadata(
metadata, logger, ENABLE_SCOPE_PERSISTENCE, options.isEnableScopePersistence()));

options.setEnableAutoTraceIdGeneration(
readBool(metadata, logger, ENABLE_AUTO_TRACE_ID_GENERATION, options.isAttachScreenshot()));
readBool(
metadata,
logger,
ENABLE_AUTO_TRACE_ID_GENERATION,
options.isEnableAutoTraceIdGeneration()));

if (options.getSessionReplay().getSessionSampleRate() == null) {
final Double sessionSampleRate =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ public final class SentryAndroidOptions extends SentryOptions {
*/
private boolean enableScopeSync = true;

/** Whether to enable automatic trace ID generation. This is mainly used by the Hybrid SDKs to
/**
* Whether to enable automatic trace ID generation. This is mainly used by the Hybrid SDKs to
* control the trace ID generation from the outside.
*/
private boolean enableAutoTraceIdGeneration = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,7 @@ class ActivityLifecycleIntegrationTest {
val sut = fixture.getSut()
val activity = mock<Activity>()
fixture.options.tracesSampleRate = null
fixture.options.isEnableAutoTraceIdGeneration = true;
fixture.options.isEnableAutoTraceIdGeneration = true

val argumentCaptor: ArgumentCaptor<ScopeCallback> = ArgumentCaptor.forClass(ScopeCallback::class.java)
val scope = Scope(fixture.options)
Expand All @@ -1411,7 +1411,7 @@ class ActivityLifecycleIntegrationTest {
val sut = fixture.getSut()
val activity = mock<Activity>()
fixture.options.tracesSampleRate = null
fixture.options.isEnableAutoTraceIdGeneration = false;
fixture.options.isEnableAutoTraceIdGeneration = false

val argumentCaptor: ArgumentCaptor<ScopeCallback> = ArgumentCaptor.forClass(ScopeCallback::class.java)
val scope = Scope(fixture.options)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ import io.sentry.android.core.SentryAndroidOptions
import io.sentry.protocol.SentryId
import io.sentry.protocol.TransactionNameSource
import org.mockito.ArgumentCaptor
import org.mockito.ArgumentMatchers
import org.mockito.kotlin.any
import org.mockito.kotlin.argThat
import org.mockito.kotlin.check
import org.mockito.kotlin.clearInvocations
import org.mockito.kotlin.doAnswer
Expand All @@ -37,9 +35,9 @@ import org.mockito.kotlin.verify
import org.mockito.kotlin.whenever
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertNotEquals
import kotlin.test.assertNotNull
import kotlin.test.assertNull
import kotlin.test.assertNotEquals

class SentryGestureListenerTracingTest {
class Fixture {
Expand Down Expand Up @@ -378,7 +376,6 @@ class SentryGestureListenerTracingTest {
@Test
fun `when tracing is disabled and auto trace id generation is disabled, does not start a new trace`() {
val sut = fixture.getSut<View>(tracesSampleRate = null, isEnableAutoTraceIdGeneration = false)
val scope = Scope(fixture.options)

sut.onSingleTapUp(fixture.event)

Expand Down

0 comments on commit 46039a5

Please sign in to comment.