Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove version field #890

Merged
merged 1 commit into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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__"
}