-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: extract emb.type to separate source file
- Loading branch information
1 parent
34f961a
commit b4d2c94
Showing
12 changed files
with
68 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/arch/schema/EmbType.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package io.embrace.android.embracesdk.arch.schema | ||
|
||
internal sealed class EmbType { | ||
|
||
/** | ||
* Keys that track how fast a time interval is. Only applies to spans. | ||
*/ | ||
internal sealed class Performance : TelemetryType | ||
|
||
/** | ||
* Keys that track a point in time & is visual in nature. Applies to spans, logs, and span events. | ||
*/ | ||
internal sealed class Ux(subtype: String) : TelemetryType { | ||
internal object View : Ux("view") | ||
|
||
override val description = "ux.$subtype" | ||
} | ||
|
||
/** | ||
* Keys that track a point in time that is not visual in nature. Applies to spans, logs, and span events. | ||
*/ | ||
internal sealed class System(subtype: String) : TelemetryType { | ||
internal object Breadcrumb : System("breadcrumb") | ||
internal object Log : System("log") | ||
internal object Exit : System("exit") | ||
|
||
override val description = "system.$subtype" | ||
} | ||
} | ||
|
||
/** | ||
* Represents a telemetry type (emb.type). For example, "ux.view" is a type that represents | ||
* a visual event around a UI element. ux is the type, and view is the subtype. This tells the | ||
* backend that it can assume the data in the event follows a particular schema. | ||
*/ | ||
internal interface TelemetryType { | ||
val description: String | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters