Skip to content

Commit

Permalink
refactor: remove version field
Browse files Browse the repository at this point in the history
  • Loading branch information
fractalwrench committed May 28, 2024
1 parent efdc127 commit 319b76d
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package io.embrace.android.embracesdk.payload

import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
import io.embrace.android.embracesdk.comms.api.ApiClient
import io.embrace.android.embracesdk.internal.payload.EnvelopeMetadata
import io.embrace.android.embracesdk.internal.payload.EnvelopeResource
import io.embrace.android.embracesdk.internal.payload.SessionPayload
Expand Down Expand Up @@ -45,9 +44,6 @@ internal data class SessionMessage @JvmOverloads internal constructor(
@Json(name = "span_snapshots")
val spanSnapshots: List<EmbraceSpanData>? = null,

@Json(name = "v")
val version: Int? = ApiClient.MESSAGE_VERSION,

/*
* Values below this point are copied temporarily from [Envelope]. Eventually we will migrate
* everything to use [Envelope] and [SessionPayload] and remove this class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ internal class V2PayloadMessageCollator(
type = envelope.type,

// make legacy fields null
version = null,
spans = null,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ internal class V2PayloadMessageCollatorTest {
private fun SessionMessage.verifyFinalFieldsPopulated(
payloadType: PayloadType
) {
assertNull(version)
assertNull(spans)
assertNotNull(appInfo)
assertNotNull(deviceInfo)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,5 @@
"events": [],
"attributes": {}
}
],
"v": 13
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,5 @@
"events": [],
"attributes": {}
}
],
"v": 13
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,5 @@
"wvi_beta": "__EMBRACE_TEST_IGNORE__"
},
"spans": "__EMBRACE_TEST_IGNORE__",
"span_snapshots": "__EMBRACE_TEST_IGNORE__",
"v": 13
"span_snapshots": "__EMBRACE_TEST_IGNORE__"
}

0 comments on commit 319b76d

Please sign in to comment.