Skip to content

Commit e5ef568

Browse files
committed
Revert without formatting
1 parent 80588be commit e5ef568

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

apps/webapp/app/v3/otlpExporter.server.ts

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ class OTLPExporter {
7474
});
7575
}
7676

77-
async exportMetrics(request: ExportMetricsServiceRequest): Promise<ExportMetricsServiceResponse> {
77+
async exportMetrics(
78+
request: ExportMetricsServiceRequest
79+
): Promise<ExportMetricsServiceResponse> {
7880
return await startSpan(this._tracer, "exportMetrics", async (span) => {
7981
const rows = this.#filterResourceMetrics(request.resourceMetrics).flatMap(
8082
(resourceMetrics) => {
@@ -391,10 +393,7 @@ function convertSpansToCreateableEvents(
391393
SemanticInternalAttributes.METADATA
392394
);
393395

394-
const runTags = extractArrayAttribute(
395-
span.attributes ?? [],
396-
SemanticInternalAttributes.RUN_TAGS
397-
);
396+
const runTags = extractArrayAttribute(span.attributes ?? [], SemanticInternalAttributes.RUN_TAGS);
398397

399398
const properties =
400399
truncateAttributes(
@@ -465,10 +464,7 @@ function floorToTenSecondBucket(timeUnixNano: bigint | number): string {
465464
const flooredMs = Math.floor(epochMs / 10_000) * 10_000;
466465
const date = new Date(flooredMs);
467466
// Format as ClickHouse DateTime: YYYY-MM-DD HH:MM:SS
468-
return date
469-
.toISOString()
470-
.replace("T", " ")
471-
.replace(/\.\d{3}Z$/, "");
467+
return date.toISOString().replace("T", " ").replace(/\.\d{3}Z$/, "");
472468
}
473469

474470
function convertMetricsToClickhouseRows(
@@ -588,7 +584,8 @@ function resolveDataPointContext(
588584
attributes: Record<string, unknown>;
589585
} {
590586
const runId =
591-
resourceCtx.runId ?? extractStringAttribute(dpAttributes, SemanticInternalAttributes.RUN_ID);
587+
resourceCtx.runId ??
588+
extractStringAttribute(dpAttributes, SemanticInternalAttributes.RUN_ID);
592589
const taskSlug =
593590
resourceCtx.taskSlug ??
594591
extractStringAttribute(dpAttributes, SemanticInternalAttributes.TASK_SLUG);
@@ -1197,4 +1194,4 @@ function initializeOTLPExporter() {
11971194
? parseInt(process.env.SERVER_OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT, 10)
11981195
: 8192
11991196
);
1200-
}
1197+
}

0 commit comments

Comments
 (0)