Skip to content

Commit

Permalink
Merge pull request #529 from embrace-io/add-remaining-payload
Browse files Browse the repository at this point in the history
Add remaining parts to new payload
  • Loading branch information
fractalwrench committed Mar 8, 2024
2 parents ef3cca9 + 67f2f11 commit 1765a02
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.embrace.android.embracesdk.internal.payload

import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass

/**
* A recording of an event. Typically the record includes a timestamp indicating when the event
Expand All @@ -19,6 +20,7 @@ import com.squareup.moshi.Json
* @param spanId The span ID of the log. Can be set for logs that are part of a particular
* processing span. If span_id is present, trace_id SHOULD be also present.
*/
@JsonClass(generateAdapter = true)
internal data class Log(

/* The time the log was captured, in nanoseconds since the Unix epoch */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package io.embrace.android.embracesdk.internal.payload

import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass

/**
* A value containing the body of the log record
*
* @param message The log message
*/
@JsonClass(generateAdapter = true)
internal data class LogBody(

/* The log message */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package io.embrace.android.embracesdk.internal.payload

import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass

/**
* A set of log messages sent by the user
*
* @param logs
*/
@JsonClass(generateAdapter = true)
internal data class LogPayload(

@Json(name = "logs")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,31 @@ package io.embrace.android.embracesdk.internal.payload
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass

/**
* The session payload, containing the session itself and different objects tied to this session
*
* @param spans A list of spans that have completed since the last session, including the session
* span, which contains metadata about the session represented by this payload. The spans included
* here may not have started in this session, but they ended during it.
* @param spanSnapshots A list of spans that are still active at the time of the session's end.
* @param internalError
* @param sharedLibSymbolMapping A map of symbols that are associated with the session. We use this
* to associate the symbolication files that have been uploaded with UUIDs with the stacktrace module
* names, which don’t have UUIDs in them. Previous name: s.sb
*/
@JsonClass(generateAdapter = true)
internal data class SessionPayload(

/* A list of spans that have completed since the last session, including the session span,
which contains metadata about the session represented by this payload. The spans included
here may not have started in this session, but they ended during it. */
@Json(name = "spans")
val spans: List<Span>? = null,

/* A list of spans that are still active at the time of the session's end. */
@Json(name = "span_snapshots")
val spanSnapshots: List<Span>? = null,

@Json(name = "internal_error")
val internalError: InternalError? = null,

Expand All @@ -14,7 +36,6 @@ internal data class SessionPayload(
* We use this to associate the symbolication files that have been uploaded with UUIDs with the stacktrace module names,
* which don’t have UUIDs in them. Previous name: s.sb
*/

@Json(name = "shared_lib_symbol_mapping")
val sharedLibSymbolMapping: Map<String, String>? = null
)

0 comments on commit 1765a02

Please sign in to comment.