mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
style(analytics): normalize AnalyticsTableColumn constructor formatting
Reformat multi-line new AnalyticsTableColumn(...) expressions to a consistent style and tidy up minor inline description/spacing in ExceptionInstance, Log, Metric and Span models.
This commit is contained in:
@@ -171,8 +171,8 @@ export default class ExceptionInstance extends AnalyticsBaseModel {
|
||||
},
|
||||
});
|
||||
|
||||
const spanStatusCodeColumn: AnalyticsTableColumn =
|
||||
new AnalyticsTableColumn({
|
||||
const spanStatusCodeColumn: AnalyticsTableColumn = new AnalyticsTableColumn(
|
||||
{
|
||||
key: "spanStatusCode",
|
||||
title: "Span Status Code",
|
||||
description: "Span Status Code",
|
||||
@@ -193,13 +193,13 @@ export default class ExceptionInstance extends AnalyticsBaseModel {
|
||||
],
|
||||
update: [],
|
||||
},
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
const escapedColumn: AnalyticsTableColumn = new AnalyticsTableColumn({
|
||||
key: "escaped",
|
||||
title: "Exception Escaped",
|
||||
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.
|
||||
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.
|
||||
required: false,
|
||||
type: TableColumnType.Boolean,
|
||||
accessControl: {
|
||||
|
||||
@@ -126,8 +126,8 @@ export default class Log extends AnalyticsBaseModel {
|
||||
},
|
||||
});
|
||||
|
||||
const severityNumberColumn: AnalyticsTableColumn =
|
||||
new AnalyticsTableColumn({
|
||||
const severityNumberColumn: AnalyticsTableColumn = new AnalyticsTableColumn(
|
||||
{
|
||||
key: "severityNumber",
|
||||
title: "Severity Number",
|
||||
description: "Log Severity Number",
|
||||
@@ -148,7 +148,8 @@ export default class Log extends AnalyticsBaseModel {
|
||||
],
|
||||
update: [],
|
||||
},
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
const attributesColumn: AnalyticsTableColumn = new AnalyticsTableColumn({
|
||||
key: "attributes",
|
||||
|
||||
@@ -429,33 +429,32 @@ export default class Metric extends AnalyticsBaseModel {
|
||||
},
|
||||
});
|
||||
|
||||
const bucketCountsColumn: AnalyticsTableColumn =
|
||||
new AnalyticsTableColumn({
|
||||
key: "bucketCounts",
|
||||
title: "Bucket Counts",
|
||||
description: "Bucket Counts",
|
||||
required: true,
|
||||
defaultValue: [],
|
||||
type: TableColumnType.ArrayNumber,
|
||||
accessControl: {
|
||||
read: [
|
||||
Permission.ProjectOwner,
|
||||
Permission.ProjectAdmin,
|
||||
Permission.ProjectMember,
|
||||
Permission.ReadTelemetryServiceLog,
|
||||
],
|
||||
create: [
|
||||
Permission.ProjectOwner,
|
||||
Permission.ProjectAdmin,
|
||||
Permission.ProjectMember,
|
||||
Permission.CreateTelemetryServiceLog,
|
||||
],
|
||||
update: [],
|
||||
},
|
||||
});
|
||||
const bucketCountsColumn: AnalyticsTableColumn = new AnalyticsTableColumn({
|
||||
key: "bucketCounts",
|
||||
title: "Bucket Counts",
|
||||
description: "Bucket Counts",
|
||||
required: true,
|
||||
defaultValue: [],
|
||||
type: TableColumnType.ArrayNumber,
|
||||
accessControl: {
|
||||
read: [
|
||||
Permission.ProjectOwner,
|
||||
Permission.ProjectAdmin,
|
||||
Permission.ProjectMember,
|
||||
Permission.ReadTelemetryServiceLog,
|
||||
],
|
||||
create: [
|
||||
Permission.ProjectOwner,
|
||||
Permission.ProjectAdmin,
|
||||
Permission.ProjectMember,
|
||||
Permission.CreateTelemetryServiceLog,
|
||||
],
|
||||
update: [],
|
||||
},
|
||||
});
|
||||
|
||||
const explicitBoundsColumn: AnalyticsTableColumn =
|
||||
new AnalyticsTableColumn({
|
||||
const explicitBoundsColumn: AnalyticsTableColumn = new AnalyticsTableColumn(
|
||||
{
|
||||
key: "explicitBounds",
|
||||
title: "Explicit Bonds",
|
||||
description: "Explicit Bonds",
|
||||
@@ -477,7 +476,8 @@ export default class Metric extends AnalyticsBaseModel {
|
||||
],
|
||||
update: [],
|
||||
},
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
super({
|
||||
tableName: "MetricItem",
|
||||
|
||||
@@ -252,29 +252,28 @@ export default class Span extends AnalyticsBaseModel {
|
||||
},
|
||||
});
|
||||
|
||||
const parentSpanIdColumn: AnalyticsTableColumn =
|
||||
new AnalyticsTableColumn({
|
||||
key: "parentSpanId",
|
||||
title: "Parent Span ID",
|
||||
description: "ID of the parent span",
|
||||
required: false,
|
||||
type: TableColumnType.Text,
|
||||
accessControl: {
|
||||
read: [
|
||||
Permission.ProjectOwner,
|
||||
Permission.ProjectAdmin,
|
||||
Permission.ProjectMember,
|
||||
Permission.ReadTelemetryServiceTraces,
|
||||
],
|
||||
create: [
|
||||
Permission.ProjectOwner,
|
||||
Permission.ProjectAdmin,
|
||||
Permission.ProjectMember,
|
||||
Permission.CreateTelemetryServiceTraces,
|
||||
],
|
||||
update: [],
|
||||
},
|
||||
});
|
||||
const parentSpanIdColumn: AnalyticsTableColumn = new AnalyticsTableColumn({
|
||||
key: "parentSpanId",
|
||||
title: "Parent Span ID",
|
||||
description: "ID of the parent span",
|
||||
required: false,
|
||||
type: TableColumnType.Text,
|
||||
accessControl: {
|
||||
read: [
|
||||
Permission.ProjectOwner,
|
||||
Permission.ProjectAdmin,
|
||||
Permission.ProjectMember,
|
||||
Permission.ReadTelemetryServiceTraces,
|
||||
],
|
||||
create: [
|
||||
Permission.ProjectOwner,
|
||||
Permission.ProjectAdmin,
|
||||
Permission.ProjectMember,
|
||||
Permission.CreateTelemetryServiceTraces,
|
||||
],
|
||||
update: [],
|
||||
},
|
||||
});
|
||||
|
||||
const traceStateColumn: AnalyticsTableColumn = new AnalyticsTableColumn({
|
||||
key: "traceState",
|
||||
@@ -515,7 +514,7 @@ export default class Span extends AnalyticsBaseModel {
|
||||
nameColumn,
|
||||
kindColumn,
|
||||
],
|
||||
projections: [],
|
||||
projections: [],
|
||||
sortKeys: ["projectId", "startTime", "serviceId", "traceId"],
|
||||
primaryKeys: ["projectId", "startTime", "serviceId", "traceId"],
|
||||
partitionKey: "sipHash64(projectId) % 16",
|
||||
|
||||
Reference in New Issue
Block a user