Skip to content

Commit

Permalink
Turn on Spans by default (#43)
Browse files Browse the repository at this point in the history
## Goal

Spans will be on by default
  • Loading branch information
bidetofevil authored Nov 7, 2023
2 parents 978a47a + 0f412ba commit ce8a627
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,6 @@
"un": "John Doe",
"per": ["first_day"]
},
"spans": "__EMBRACE_TEST_IGNORE__",
"v": 13
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ internal class SpansBehavior(
remoteSupplier
) {
companion object {
private const val DEFAULT_PCT_ENABLED = 0.0f
private const val DEFAULT_PCT_ENABLED = 100.0f
}

fun isSpansEnabled(): Boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package io.embrace.android.embracesdk.config.behavior

import io.embrace.android.embracesdk.config.remote.SpansRemoteConfig
import io.embrace.android.embracesdk.fakes.fakeSpansBehavior
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Test

Expand All @@ -14,7 +13,7 @@ internal class SpansBehaviorTest {
@Test
fun testDefaults() {
with(fakeSpansBehavior()) {
assertFalse(isSpansEnabled())
assertTrue(isSpansEnabled())
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ internal class EmbraceSpansServiceTest {

@Test
fun `initializing service if the config is not on won't actually initialize it`() {
spansRemoteConfig = SpansRemoteConfig(pctEnabled = 0f)
configService.updateListeners()
spansService.initializeService(1, 5)
configService.updateListeners()
Expand Down

0 comments on commit ce8a627

Please sign in to comment.