@oneuptime/common 7.0.2990 → 7.0.3010

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. package/Models/AnalyticsModels/ExceptionInstance.ts +488 -0
  2. package/Models/AnalyticsModels/Index.ts +2 -0
  3. package/Models/AnalyticsModels/Span.ts +2 -2
  4. package/Models/DatabaseModels/Index.ts +4 -0
  5. package/Models/DatabaseModels/TelemetryException.ts +978 -0
  6. package/Server/API/StatusAPI.ts +63 -51
  7. package/Server/EnvironmentConfig.ts +3 -0
  8. package/Server/Infrastructure/Postgres/SchemaMigrations/1724610006927-MigrationName.ts +93 -0
  9. package/Server/Infrastructure/Postgres/SchemaMigrations/1724613666632-MigrationName.ts +60 -0
  10. package/Server/Infrastructure/Postgres/SchemaMigrations/1724659071843-MigrationName.ts +17 -0
  11. package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +6 -0
  12. package/Server/Infrastructure/Queue.ts +36 -1
  13. package/Server/Infrastructure/QueueWorker.ts +2 -2
  14. package/Server/Services/DatabaseService.ts +4 -5
  15. package/Server/Services/ExceptionInstanceService.ts +11 -0
  16. package/Server/Services/Index.ts +5 -0
  17. package/Server/Services/StatusPageDomainService.ts +118 -59
  18. package/Server/Services/TelemetryExceptionService.ts +10 -0
  19. package/Server/Types/Database/Permissions/Index.ts +1 -1
  20. package/Server/Types/Database/UpdateByID.ts +1 -1
  21. package/Server/Utils/Greenlock/Greenlock.ts +331 -204
  22. package/Server/Utils/Logger.ts +8 -2
  23. package/Server/Utils/Telemetry.ts +109 -25
  24. package/Types/Code/CodeType.ts +1 -0
  25. package/Types/Database/PartialEntity.ts +14 -1
  26. package/Types/Date.ts +9 -1
  27. package/Types/Icon/IconProp.ts +2 -0
  28. package/Types/Permission.ts +39 -0
  29. package/UI/Components/ActionCard/ActionCard.tsx +66 -0
  30. package/UI/Components/Alerts/Alert.tsx +69 -60
  31. package/UI/Components/Card/Card.tsx +1 -0
  32. package/UI/Components/Charts/ChartGroup/ChartGroup.tsx +4 -17
  33. package/UI/Components/Charts/ChartLibrary/LineChart/LineChart.tsx +1005 -0
  34. package/UI/Components/Charts/ChartLibrary/Types/ChartDataPoint.ts +3 -0
  35. package/UI/Components/Charts/ChartLibrary/Utils/ChartColors.ts +117 -0
  36. package/UI/Components/Charts/ChartLibrary/Utils/Cx.ts +8 -0
  37. package/UI/Components/Charts/ChartLibrary/Utils/GetYAxisDomain.ts +15 -0
  38. package/UI/Components/Charts/ChartLibrary/Utils/HasOnlyOneValueForKey.ts +19 -0
  39. package/UI/Components/Charts/ChartLibrary/Utils/UseWindowOnResize.ts +17 -0
  40. package/UI/Components/Charts/Line/LineChart.tsx +58 -225
  41. package/UI/Components/Charts/Types/ChartCurve.ts +7 -0
  42. package/UI/Components/Charts/Types/DataPoint.ts +7 -0
  43. package/UI/Components/Charts/Types/SeriesPoint.ts +7 -0
  44. package/UI/Components/Charts/Types/SeriesPoints.ts +6 -0
  45. package/UI/Components/Charts/Types/XAxis/XAxis.ts +21 -0
  46. package/UI/Components/Charts/Types/XAxis/XAxisMaxMin.ts +3 -0
  47. package/UI/Components/Charts/Types/XAxis/XAxisPrecision.ts +26 -0
  48. package/UI/Components/Charts/Types/XAxis/XAxisType.ts +6 -0
  49. package/UI/Components/Charts/Types/XValue.ts +3 -0
  50. package/UI/Components/Charts/Types/YAxis/YAxis.ts +22 -0
  51. package/UI/Components/Charts/Types/YAxis/YAxisMaxMin.ts +3 -0
  52. package/UI/Components/Charts/Types/YAxis/YAxisType.ts +5 -0
  53. package/UI/Components/Charts/Types/YValue.ts +3 -0
  54. package/UI/Components/Charts/Utils/DataPoint.ts +188 -0
  55. package/UI/Components/Charts/Utils/XAxis.ts +267 -0
  56. package/UI/Components/Detail/Detail.tsx +6 -1
  57. package/UI/Components/GanttChart/Row/Row.tsx +4 -2
  58. package/UI/Components/GanttChart/Row/RowLabel.tsx +7 -3
  59. package/UI/Components/Icon/Icon.tsx +16 -0
  60. package/UI/Components/LogsViewer/LogsViewer.tsx +1 -1
  61. package/UI/Components/Types/FieldType.ts +1 -0
  62. package/UI/Config.ts +2 -0
  63. package/UI/Utils/Telemetry.ts +7 -2
  64. package/Utils/Crypto.ts +11 -0
  65. package/build/dist/Models/AnalyticsModels/ExceptionInstance.js +445 -0
  66. package/build/dist/Models/AnalyticsModels/ExceptionInstance.js.map +1 -0
  67. package/build/dist/Models/AnalyticsModels/Index.js +2 -0
  68. package/build/dist/Models/AnalyticsModels/Index.js.map +1 -1
  69. package/build/dist/Models/AnalyticsModels/Span.js +2 -2
  70. package/build/dist/Models/DatabaseModels/Index.js +2 -0
  71. package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
  72. package/build/dist/Models/DatabaseModels/TelemetryException.js +1010 -0
  73. package/build/dist/Models/DatabaseModels/TelemetryException.js.map +1 -0
  74. package/build/dist/Server/API/StatusAPI.js +52 -44
  75. package/build/dist/Server/API/StatusAPI.js.map +1 -1
  76. package/build/dist/Server/EnvironmentConfig.js +1 -0
  77. package/build/dist/Server/EnvironmentConfig.js.map +1 -1
  78. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1724610006927-MigrationName.js +38 -0
  79. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1724610006927-MigrationName.js.map +1 -0
  80. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1724613666632-MigrationName.js +26 -0
  81. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1724613666632-MigrationName.js.map +1 -0
  82. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1724659071843-MigrationName.js +12 -0
  83. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1724659071843-MigrationName.js.map +1 -0
  84. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +6 -0
  85. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
  86. package/build/dist/Server/Infrastructure/Queue.js +20 -1
  87. package/build/dist/Server/Infrastructure/Queue.js.map +1 -1
  88. package/build/dist/Server/Infrastructure/QueueWorker.js +2 -2
  89. package/build/dist/Server/Infrastructure/QueueWorker.js.map +1 -1
  90. package/build/dist/Server/Services/DatabaseService.js.map +1 -1
  91. package/build/dist/Server/Services/ExceptionInstanceService.js +9 -0
  92. package/build/dist/Server/Services/ExceptionInstanceService.js.map +1 -0
  93. package/build/dist/Server/Services/Index.js +4 -0
  94. package/build/dist/Server/Services/Index.js.map +1 -1
  95. package/build/dist/Server/Services/StatusPageDomainService.js +101 -53
  96. package/build/dist/Server/Services/StatusPageDomainService.js.map +1 -1
  97. package/build/dist/Server/Services/TelemetryExceptionService.js +9 -0
  98. package/build/dist/Server/Services/TelemetryExceptionService.js.map +1 -0
  99. package/build/dist/Server/Types/Database/Permissions/Index.js.map +1 -1
  100. package/build/dist/Server/Utils/Greenlock/Greenlock.js +234 -157
  101. package/build/dist/Server/Utils/Greenlock/Greenlock.js.map +1 -1
  102. package/build/dist/Server/Utils/Logger.js +5 -1
  103. package/build/dist/Server/Utils/Logger.js.map +1 -1
  104. package/build/dist/Server/Utils/Telemetry.js +63 -22
  105. package/build/dist/Server/Utils/Telemetry.js.map +1 -1
  106. package/build/dist/Types/Code/CodeType.js +1 -0
  107. package/build/dist/Types/Code/CodeType.js.map +1 -1
  108. package/build/dist/Types/Database/PartialEntity.js +3 -0
  109. package/build/dist/Types/Database/PartialEntity.js.map +1 -1
  110. package/build/dist/Types/Date.js +7 -1
  111. package/build/dist/Types/Date.js.map +1 -1
  112. package/build/dist/Types/Icon/IconProp.js +2 -0
  113. package/build/dist/Types/Icon/IconProp.js.map +1 -1
  114. package/build/dist/Types/Permission.js +33 -0
  115. package/build/dist/Types/Permission.js.map +1 -1
  116. package/build/dist/UI/Components/ActionCard/ActionCard.js +27 -0
  117. package/build/dist/UI/Components/ActionCard/ActionCard.js.map +1 -0
  118. package/build/dist/UI/Components/Alerts/Alert.js +36 -45
  119. package/build/dist/UI/Components/Alerts/Alert.js.map +1 -1
  120. package/build/dist/UI/Components/Card/Card.js +1 -1
  121. package/build/dist/UI/Components/Card/Card.js.map +1 -1
  122. package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js +4 -9
  123. package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js.map +1 -1
  124. package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js +388 -0
  125. package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js.map +1 -0
  126. package/build/dist/UI/Components/Charts/ChartLibrary/Types/ChartDataPoint.js +2 -0
  127. package/build/dist/UI/Components/Charts/ChartLibrary/Types/ChartDataPoint.js.map +1 -0
  128. package/build/dist/UI/Components/Charts/ChartLibrary/Utils/ChartColors.js +88 -0
  129. package/build/dist/UI/Components/Charts/ChartLibrary/Utils/ChartColors.js.map +1 -0
  130. package/build/dist/UI/Components/Charts/ChartLibrary/Utils/Cx.js +7 -0
  131. package/build/dist/UI/Components/Charts/ChartLibrary/Utils/Cx.js.map +1 -0
  132. package/build/dist/UI/Components/Charts/ChartLibrary/Utils/GetYAxisDomain.js +7 -0
  133. package/build/dist/UI/Components/Charts/ChartLibrary/Utils/GetYAxisDomain.js.map +1 -0
  134. package/build/dist/UI/Components/Charts/ChartLibrary/Utils/HasOnlyOneValueForKey.js +14 -0
  135. package/build/dist/UI/Components/Charts/ChartLibrary/Utils/HasOnlyOneValueForKey.js.map +1 -0
  136. package/build/dist/UI/Components/Charts/ChartLibrary/Utils/UseWindowOnResize.js +14 -0
  137. package/build/dist/UI/Components/Charts/ChartLibrary/Utils/UseWindowOnResize.js.map +1 -0
  138. package/build/dist/UI/Components/Charts/Line/LineChart.js +30 -136
  139. package/build/dist/UI/Components/Charts/Line/LineChart.js.map +1 -1
  140. package/build/dist/UI/Components/Charts/Types/ChartCurve.js +8 -0
  141. package/build/dist/UI/Components/Charts/Types/ChartCurve.js.map +1 -0
  142. package/build/dist/UI/Components/Charts/Types/DataPoint.js +2 -0
  143. package/build/dist/UI/Components/Charts/Types/DataPoint.js.map +1 -0
  144. package/build/dist/UI/Components/Charts/Types/SeriesPoint.js +2 -0
  145. package/build/dist/UI/Components/Charts/Types/SeriesPoint.js.map +1 -0
  146. package/build/dist/UI/Components/Charts/Types/SeriesPoints.js +2 -0
  147. package/build/dist/UI/Components/Charts/Types/SeriesPoints.js.map +1 -0
  148. package/build/dist/UI/Components/Charts/Types/XAxis/XAxis.js +8 -0
  149. package/build/dist/UI/Components/Charts/Types/XAxis/XAxis.js.map +1 -0
  150. package/build/dist/UI/Components/Charts/Types/XAxis/XAxisMaxMin.js +2 -0
  151. package/build/dist/UI/Components/Charts/Types/XAxis/XAxisMaxMin.js.map +1 -0
  152. package/build/dist/UI/Components/Charts/Types/XAxis/XAxisPrecision.js +27 -0
  153. package/build/dist/UI/Components/Charts/Types/XAxis/XAxisPrecision.js.map +1 -0
  154. package/build/dist/UI/Components/Charts/Types/XAxis/XAxisType.js +7 -0
  155. package/build/dist/UI/Components/Charts/Types/XAxis/XAxisType.js.map +1 -0
  156. package/build/dist/UI/Components/Charts/Types/XValue.js +2 -0
  157. package/build/dist/UI/Components/Charts/Types/XValue.js.map +1 -0
  158. package/build/dist/UI/Components/Charts/Types/YAxis/YAxis.js +8 -0
  159. package/build/dist/UI/Components/Charts/Types/YAxis/YAxis.js.map +1 -0
  160. package/build/dist/UI/Components/Charts/Types/YAxis/YAxisMaxMin.js +2 -0
  161. package/build/dist/UI/Components/Charts/Types/YAxis/YAxisMaxMin.js.map +1 -0
  162. package/build/dist/UI/Components/Charts/Types/YAxis/YAxisType.js +6 -0
  163. package/build/dist/UI/Components/Charts/Types/YAxis/YAxisType.js.map +1 -0
  164. package/build/dist/UI/Components/Charts/Types/YValue.js +2 -0
  165. package/build/dist/UI/Components/Charts/Types/YValue.js.map +1 -0
  166. package/build/dist/UI/Components/Charts/Utils/DataPoint.js +109 -0
  167. package/build/dist/UI/Components/Charts/Utils/DataPoint.js.map +1 -0
  168. package/build/dist/UI/Components/Charts/Utils/XAxis.js +241 -0
  169. package/build/dist/UI/Components/Charts/Utils/XAxis.js.map +1 -0
  170. package/build/dist/UI/Components/Detail/Detail.js +5 -1
  171. package/build/dist/UI/Components/Detail/Detail.js.map +1 -1
  172. package/build/dist/UI/Components/GanttChart/Row/Row.js +2 -2
  173. package/build/dist/UI/Components/GanttChart/Row/Row.js.map +1 -1
  174. package/build/dist/UI/Components/GanttChart/Row/RowLabel.js +3 -3
  175. package/build/dist/UI/Components/GanttChart/Row/RowLabel.js.map +1 -1
  176. package/build/dist/UI/Components/Icon/Icon.js +6 -0
  177. package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
  178. package/build/dist/UI/Components/LogsViewer/LogsViewer.js +1 -1
  179. package/build/dist/UI/Components/LogsViewer/LogsViewer.js.map +1 -1
  180. package/build/dist/UI/Components/Types/FieldType.js +1 -0
  181. package/build/dist/UI/Components/Types/FieldType.js.map +1 -1
  182. package/build/dist/UI/Config.js +1 -0
  183. package/build/dist/UI/Config.js.map +1 -1
  184. package/build/dist/UI/Utils/Telemetry.js +6 -3
  185. package/build/dist/UI/Utils/Telemetry.js.map +1 -1
  186. package/build/dist/Utils/Crypto.js +10 -0
  187. package/build/dist/Utils/Crypto.js.map +1 -0
  188. package/package.json +15 -13
  189. package/UI/Components/Charts/Bar/Bar.tsx +0 -0
  190. package/UI/Components/Charts/Base/BaseChart.tsx +0 -0
  191. package/UI/Components/Charts/Tooltip/Tooltip.tsx +0 -84
  192. package/build/dist/UI/Components/Charts/Bar/Bar.js +0 -2
  193. package/build/dist/UI/Components/Charts/Bar/Bar.js.map +0 -1
  194. package/build/dist/UI/Components/Charts/Base/BaseChart.js +0 -2
  195. package/build/dist/UI/Components/Charts/Base/BaseChart.js.map +0 -1
  196. package/build/dist/UI/Components/Charts/Tooltip/Tooltip.js +0 -34
  197. package/build/dist/UI/Components/Charts/Tooltip/Tooltip.js.map +0 -1
@@ -0,0 +1,488 @@
1
+ import AnalyticsBaseModel from "./AnalyticsBaseModel/AnalyticsBaseModel";
2
+ import Route from "../../Types/API/Route";
3
+ import AnalyticsTableEngine from "../../Types/AnalyticsDatabase/AnalyticsTableEngine";
4
+ import AnalyticsTableColumn from "../../Types/AnalyticsDatabase/TableColumn";
5
+ import TableColumnType from "../../Types/AnalyticsDatabase/TableColumnType";
6
+ import ObjectID from "../../Types/ObjectID";
7
+ import Permission from "../../Types/Permission";
8
+ import { SpanStatus } from "./Span";
9
+
10
+ export default class ExceptionInstance extends AnalyticsBaseModel {
11
+ public constructor() {
12
+ super({
13
+ tableName: "ExceptionInstanceTelemetry",
14
+ tableEngine: AnalyticsTableEngine.MergeTree,
15
+ singularName: "Exception",
16
+ pluralName: "Exceptions",
17
+ enableRealtimeEventsOn: {
18
+ create: true,
19
+ },
20
+ accessControl: {
21
+ read: [
22
+ Permission.ProjectOwner,
23
+ Permission.ProjectAdmin,
24
+ Permission.ProjectMember,
25
+ Permission.ReadTelemetryException,
26
+ ],
27
+ create: [
28
+ Permission.ProjectOwner,
29
+ Permission.ProjectAdmin,
30
+ Permission.ProjectMember,
31
+ Permission.CreateTelemetryException,
32
+ ],
33
+ update: [
34
+ Permission.ProjectOwner,
35
+ Permission.ProjectAdmin,
36
+ Permission.ProjectMember,
37
+ Permission.EditTelemetryException,
38
+ ],
39
+ delete: [
40
+ Permission.ProjectOwner,
41
+ Permission.ProjectAdmin,
42
+ Permission.ProjectMember,
43
+ Permission.DeleteTelemetryException,
44
+ ],
45
+ },
46
+ crudApiPath: new Route("/exceptions"),
47
+ tableColumns: [
48
+ new AnalyticsTableColumn({
49
+ key: "projectId",
50
+ title: "Project ID",
51
+ description: "ID of project",
52
+ required: true,
53
+ type: TableColumnType.ObjectID,
54
+ isTenantId: true,
55
+ accessControl: {
56
+ read: [
57
+ Permission.ProjectOwner,
58
+ Permission.ProjectAdmin,
59
+ Permission.ProjectMember,
60
+ Permission.ReadTelemetryException,
61
+ ],
62
+ create: [
63
+ Permission.ProjectOwner,
64
+ Permission.ProjectAdmin,
65
+ Permission.ProjectMember,
66
+ Permission.CreateTelemetryException,
67
+ ],
68
+ update: [],
69
+ },
70
+ }),
71
+
72
+ new AnalyticsTableColumn({
73
+ key: "serviceId",
74
+ title: "Service ID",
75
+ description: "ID of the Service which created the log",
76
+ required: true,
77
+ type: TableColumnType.ObjectID,
78
+ accessControl: {
79
+ read: [
80
+ Permission.ProjectOwner,
81
+ Permission.ProjectAdmin,
82
+ Permission.ProjectMember,
83
+ Permission.ReadTelemetryException,
84
+ ],
85
+ create: [
86
+ Permission.ProjectOwner,
87
+ Permission.ProjectAdmin,
88
+ Permission.ProjectMember,
89
+ Permission.CreateTelemetryException,
90
+ ],
91
+ update: [],
92
+ },
93
+ }),
94
+
95
+ new AnalyticsTableColumn({
96
+ key: "time",
97
+ title: "Time",
98
+ description: "When was the log created?",
99
+ required: true,
100
+ type: TableColumnType.Date,
101
+ accessControl: {
102
+ read: [
103
+ Permission.ProjectOwner,
104
+ Permission.ProjectAdmin,
105
+ Permission.ProjectMember,
106
+ Permission.ReadTelemetryException,
107
+ ],
108
+ create: [
109
+ Permission.ProjectOwner,
110
+ Permission.ProjectAdmin,
111
+ Permission.ProjectMember,
112
+ Permission.CreateTelemetryException,
113
+ ],
114
+ update: [],
115
+ },
116
+ }),
117
+
118
+ new AnalyticsTableColumn({
119
+ key: "timeUnixNano",
120
+ title: "Time (in Unix Nano)",
121
+ description: "When was the log created?",
122
+ required: true,
123
+ type: TableColumnType.LongNumber,
124
+ accessControl: {
125
+ read: [
126
+ Permission.ProjectOwner,
127
+ Permission.ProjectAdmin,
128
+ Permission.ProjectMember,
129
+ Permission.ReadTelemetryException,
130
+ ],
131
+ create: [
132
+ Permission.ProjectOwner,
133
+ Permission.ProjectAdmin,
134
+ Permission.ProjectMember,
135
+ Permission.CreateTelemetryException,
136
+ ],
137
+ update: [],
138
+ },
139
+ }),
140
+
141
+ new AnalyticsTableColumn({
142
+ key: "exceptionType",
143
+ title: "Exception Type",
144
+ description: "Exception Type", // Examples: java.net.ConnectException; OSError; etc.
145
+ required: false,
146
+ type: TableColumnType.Text,
147
+ accessControl: {
148
+ read: [
149
+ Permission.ProjectOwner,
150
+ Permission.ProjectAdmin,
151
+ Permission.ProjectMember,
152
+ Permission.ReadTelemetryException,
153
+ ],
154
+ create: [
155
+ Permission.ProjectOwner,
156
+ Permission.ProjectAdmin,
157
+ Permission.ProjectMember,
158
+ Permission.CreateTelemetryException,
159
+ ],
160
+ update: [],
161
+ },
162
+ }),
163
+
164
+ new AnalyticsTableColumn({
165
+ key: "stackTrace",
166
+ title: "Stack Trace",
167
+ description: "Exception Stack Trace", // Examples: Division by zero; Can't convert 'int' object to str implicitly
168
+ required: false,
169
+ type: TableColumnType.Text,
170
+ accessControl: {
171
+ read: [
172
+ Permission.ProjectOwner,
173
+ Permission.ProjectAdmin,
174
+ Permission.ProjectMember,
175
+ Permission.ReadTelemetryException,
176
+ ],
177
+ create: [
178
+ Permission.ProjectOwner,
179
+ Permission.ProjectAdmin,
180
+ Permission.ProjectMember,
181
+ Permission.CreateTelemetryException,
182
+ ],
183
+ update: [],
184
+ },
185
+ }),
186
+
187
+ new AnalyticsTableColumn({
188
+ key: "message",
189
+ title: "Exception Message",
190
+ description: "Exception Message", // Examples: Division by zero; Can't convert 'int' object to str implicitly
191
+ required: false,
192
+ type: TableColumnType.Text,
193
+ accessControl: {
194
+ read: [
195
+ Permission.ProjectOwner,
196
+ Permission.ProjectAdmin,
197
+ Permission.ProjectMember,
198
+ Permission.ReadTelemetryException,
199
+ ],
200
+ create: [
201
+ Permission.ProjectOwner,
202
+ Permission.ProjectAdmin,
203
+ Permission.ProjectMember,
204
+ Permission.CreateTelemetryException,
205
+ ],
206
+ update: [],
207
+ },
208
+ }),
209
+
210
+ new AnalyticsTableColumn({
211
+ key: "spanStatusCode",
212
+ title: "Span Status Code",
213
+ description: "Span Status Code",
214
+ required: false,
215
+ type: TableColumnType.Number,
216
+ accessControl: {
217
+ read: [
218
+ Permission.ProjectOwner,
219
+ Permission.ProjectAdmin,
220
+ Permission.ProjectMember,
221
+ Permission.ReadTelemetryException,
222
+ ],
223
+ create: [
224
+ Permission.ProjectOwner,
225
+ Permission.ProjectAdmin,
226
+ Permission.ProjectMember,
227
+ Permission.CreateTelemetryException,
228
+ ],
229
+ update: [],
230
+ },
231
+ }),
232
+
233
+ new AnalyticsTableColumn({
234
+ key: "escaped",
235
+ title: "Exception Escaped",
236
+ description: "Exception Escaped", // SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span.
237
+ required: false,
238
+ type: TableColumnType.Boolean,
239
+ accessControl: {
240
+ read: [
241
+ Permission.ProjectOwner,
242
+ Permission.ProjectAdmin,
243
+ Permission.ProjectMember,
244
+ Permission.ReadTelemetryException,
245
+ ],
246
+ create: [
247
+ Permission.ProjectOwner,
248
+ Permission.ProjectAdmin,
249
+ Permission.ProjectMember,
250
+ Permission.CreateTelemetryException,
251
+ ],
252
+ update: [],
253
+ },
254
+ }),
255
+
256
+ new AnalyticsTableColumn({
257
+ key: "traceId",
258
+ title: "Trace ID",
259
+ description: "ID of the trace",
260
+ required: false,
261
+ type: TableColumnType.Text,
262
+ accessControl: {
263
+ read: [
264
+ Permission.ProjectOwner,
265
+ Permission.ProjectAdmin,
266
+ Permission.ProjectMember,
267
+ Permission.ReadTelemetryException,
268
+ ],
269
+ create: [
270
+ Permission.ProjectOwner,
271
+ Permission.ProjectAdmin,
272
+ Permission.ProjectMember,
273
+ Permission.CreateTelemetryException,
274
+ ],
275
+ update: [],
276
+ },
277
+ }),
278
+
279
+ new AnalyticsTableColumn({
280
+ key: "spanId",
281
+ title: "Span ID",
282
+ description: "ID of the span",
283
+ required: false,
284
+ type: TableColumnType.Text,
285
+ accessControl: {
286
+ read: [
287
+ Permission.ProjectOwner,
288
+ Permission.ProjectAdmin,
289
+ Permission.ProjectMember,
290
+ Permission.ReadTelemetryException,
291
+ ],
292
+ create: [
293
+ Permission.ProjectOwner,
294
+ Permission.ProjectAdmin,
295
+ Permission.ProjectMember,
296
+ Permission.CreateTelemetryException,
297
+ ],
298
+ update: [],
299
+ },
300
+ }),
301
+
302
+ new AnalyticsTableColumn({
303
+ key: "fingerprint",
304
+ title: "Fingerprint",
305
+ description: "Fingerprint of the exception",
306
+ required: true,
307
+ type: TableColumnType.Text,
308
+ accessControl: {
309
+ read: [
310
+ Permission.ProjectOwner,
311
+ Permission.ProjectAdmin,
312
+ Permission.ProjectMember,
313
+ Permission.ReadTelemetryException,
314
+ ],
315
+ create: [
316
+ Permission.ProjectOwner,
317
+ Permission.ProjectAdmin,
318
+ Permission.ProjectMember,
319
+ Permission.CreateTelemetryException,
320
+ ],
321
+ update: [],
322
+ },
323
+ }),
324
+
325
+ new AnalyticsTableColumn({
326
+ key: "spanName",
327
+ title: "Span Name",
328
+ description: "Name of the span",
329
+ required: false,
330
+ type: TableColumnType.Text,
331
+ accessControl: {
332
+ read: [
333
+ Permission.ProjectOwner,
334
+ Permission.ProjectAdmin,
335
+ Permission.ProjectMember,
336
+ Permission.ReadTelemetryServiceTraces,
337
+ ],
338
+ create: [
339
+ Permission.ProjectOwner,
340
+ Permission.ProjectAdmin,
341
+ Permission.ProjectMember,
342
+ Permission.CreateTelemetryServiceTraces,
343
+ ],
344
+ update: [],
345
+ },
346
+ }),
347
+
348
+ new AnalyticsTableColumn({
349
+ key: "attributes",
350
+ title: "Attributes",
351
+ description: "Attributes",
352
+ required: true,
353
+ defaultValue: {},
354
+ type: TableColumnType.JSON,
355
+ accessControl: {
356
+ read: [
357
+ Permission.ProjectOwner,
358
+ Permission.ProjectAdmin,
359
+ Permission.ProjectMember,
360
+ Permission.ReadTelemetryException,
361
+ ],
362
+ create: [
363
+ Permission.ProjectOwner,
364
+ Permission.ProjectAdmin,
365
+ Permission.ProjectMember,
366
+ Permission.CreateTelemetryException,
367
+ ],
368
+ update: [],
369
+ },
370
+ }),
371
+ ],
372
+ sortKeys: ["projectId", "serviceId", "fingerprint", "time"],
373
+ primaryKeys: ["projectId", "serviceId", "fingerprint"],
374
+ });
375
+ }
376
+
377
+ public get projectId(): ObjectID | undefined {
378
+ return this.getColumnValue("projectId") as ObjectID | undefined;
379
+ }
380
+
381
+ public set projectId(v: ObjectID | undefined) {
382
+ this.setColumnValue("projectId", v);
383
+ }
384
+
385
+ public get serviceId(): ObjectID | undefined {
386
+ return this.getColumnValue("serviceId") as ObjectID | undefined;
387
+ }
388
+
389
+ public set serviceId(v: ObjectID | undefined) {
390
+ this.setColumnValue("serviceId", v);
391
+ }
392
+
393
+ public get time(): Date | undefined {
394
+ return this.getColumnValue("time") as Date | undefined;
395
+ }
396
+
397
+ public set time(v: Date | undefined) {
398
+ this.setColumnValue("time", v);
399
+ }
400
+
401
+ public get timeUnixNano(): number | undefined {
402
+ return this.getColumnValue("timeUnixNano") as number | undefined;
403
+ }
404
+
405
+ public set timeUnixNano(v: number | undefined) {
406
+ this.setColumnValue("timeUnixNano", v);
407
+ }
408
+
409
+ public get traceId(): string | undefined {
410
+ return this.getColumnValue("traceId") as string | undefined;
411
+ }
412
+
413
+ public set traceId(v: string | undefined) {
414
+ this.setColumnValue("traceId", v);
415
+ }
416
+
417
+ public get spanId(): string | undefined {
418
+ return this.getColumnValue("spanId") as string | undefined;
419
+ }
420
+
421
+ public set spanId(v: string | undefined) {
422
+ this.setColumnValue("spanId", v);
423
+ }
424
+
425
+ public get exceptionType(): string | undefined {
426
+ return this.getColumnValue("exceptionType") as string | undefined;
427
+ }
428
+
429
+ public set exceptionType(v: string | undefined) {
430
+ this.setColumnValue("exceptionType", v);
431
+ }
432
+
433
+ public get stackTrace(): string | undefined {
434
+ return this.getColumnValue("stackTrace") as string | undefined;
435
+ }
436
+
437
+ public set stackTrace(v: string | undefined) {
438
+ this.setColumnValue("stackTrace", v);
439
+ }
440
+
441
+ public get message(): string | undefined {
442
+ return this.getColumnValue("message") as string | undefined;
443
+ }
444
+
445
+ public set message(v: string | undefined) {
446
+ this.setColumnValue("message", v);
447
+ }
448
+
449
+ public get escaped(): boolean | undefined {
450
+ return this.getColumnValue("escaped") as boolean | undefined;
451
+ }
452
+
453
+ public set escaped(v: boolean | undefined) {
454
+ this.setColumnValue("escaped", v);
455
+ }
456
+
457
+ public get fingerprint(): string | undefined {
458
+ return this.getColumnValue("fingerprint") as string | undefined;
459
+ }
460
+
461
+ public set fingerprint(v: string | undefined) {
462
+ this.setColumnValue("fingerprint", v);
463
+ }
464
+
465
+ public get attributes(): Record<string, any> {
466
+ return this.getColumnValue("attributes") as Record<string, any>;
467
+ }
468
+
469
+ public set attributes(v: Record<string, any>) {
470
+ this.setColumnValue("attributes", v);
471
+ }
472
+
473
+ public get spanStatusCode(): SpanStatus | undefined {
474
+ return this.getColumnValue("spanStatusCode") as SpanStatus | undefined;
475
+ }
476
+
477
+ public set spanStatusCode(v: SpanStatus | undefined) {
478
+ this.setColumnValue("spanStatusCode", v);
479
+ }
480
+
481
+ public get spanName(): string | undefined {
482
+ return this.getColumnValue("spanName") as string | undefined;
483
+ }
484
+
485
+ public set spanName(v: string | undefined) {
486
+ this.setColumnValue("spanName", v);
487
+ }
488
+ }
@@ -4,6 +4,7 @@ import Metric from "./Metric";
4
4
  import MonitorMetricsByMinute from "./MonitorMetricsByMinute";
5
5
  import Span from "./Span";
6
6
  import TelemetryAttribute from "./TelemetryAttribute";
7
+ import ExceptionInstance from "./ExceptionInstance";
7
8
 
8
9
  const AnalyticsModels: Array<typeof AnalyticsBaseModel> = [
9
10
  Log,
@@ -11,6 +12,7 @@ const AnalyticsModels: Array<typeof AnalyticsBaseModel> = [
11
12
  Metric,
12
13
  MonitorMetricsByMinute,
13
14
  TelemetryAttribute,
15
+ ExceptionInstance,
14
16
  ];
15
17
 
16
18
  export default AnalyticsModels;
@@ -16,8 +16,8 @@ export enum SpanKind {
16
16
  }
17
17
 
18
18
  export enum SpanEventType {
19
- Exception = "Exception",
20
- Event = "Event",
19
+ Exception = "exception",
20
+ Event = "event",
21
21
  }
22
22
 
23
23
  export enum SpanStatus {
@@ -135,6 +135,8 @@ import UserTwoFactorAuth from "./UserTwoFactorAuth";
135
135
 
136
136
  import TelemetryIngestionKey from "./TelemetryIngestionKey";
137
137
 
138
+ import TelemetryException from "./TelemetryException";
139
+
138
140
  export default [
139
141
  User,
140
142
  Probe,
@@ -289,4 +291,6 @@ export default [
289
291
  UserTwoFactorAuth,
290
292
 
291
293
  TelemetryIngestionKey,
294
+
295
+ TelemetryException,
292
296
  ];