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:
Nawaz Dhandala
2025-10-21 14:56:01 +01:00
parent 20129e606a
commit 8c6bc331a4
4 changed files with 59 additions and 59 deletions

View File

@@ -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: {

View File

@@ -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",

View File

@@ -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",

View File

@@ -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",