@deslop/scope 0.1.1165 → 0.1.1171
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.
- package/dist/server.js +5 -2
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -65180,7 +65180,7 @@ const layerNodeHttpServer = layerConfig(createServer, {
|
|
|
65180
65180
|
port: pipe(Port("PORT"), withDefault(5e3))
|
|
65181
65181
|
});
|
|
65182
65182
|
// package.json
|
|
65183
|
-
var version = "0.1.
|
|
65183
|
+
var version = "0.1.1171";
|
|
65184
65184
|
// src/services/telemetry/schema.ts
|
|
65185
65185
|
var TelemetryError = class extends TaggedError()("TelemetryError", {
|
|
65186
65186
|
cause: optional$6(Defect()),
|
|
@@ -65374,6 +65374,9 @@ const SortFilters = Struct({
|
|
|
65374
65374
|
sort: pipe(Query.fields.sort, withDecodingDefaultTypeKey(succeed$4("recent")), annotateEncoded({ description: "\"recent\" puts the newest first, \"slowest\" the longest first." }))
|
|
65375
65375
|
});
|
|
65376
65376
|
// src/services/telemetry/lib/utils.ts
|
|
65377
|
+
function logTime(log, now) {
|
|
65378
|
+
return pipe(filter$1([log.timeUnixNano, log.observedTimeUnixNano], (time) => time !== void 0 && time !== "0"), head, flatMap$6(fromUndefinedOr), getOrElse(() => now));
|
|
65379
|
+
}
|
|
65377
65380
|
function resourceString(resource, key) {
|
|
65378
65381
|
return pipe(resource.attributes ?? [], findFirst((attribute) => attribute.key === key), flatMap$6((attribute) => liftPredicate(attribute.value["stringValue"], isString$1)), getOrElse(() => ""));
|
|
65379
65382
|
}
|
|
@@ -65607,7 +65610,7 @@ var Telemetry = class extends Service$2()("@deslop/scope/services/telemetry/serv
|
|
|
65607
65610
|
onFalse: () => 0,
|
|
65608
65611
|
onTrue: () => 2
|
|
65609
65612
|
}),
|
|
65610
|
-
time: item.log
|
|
65613
|
+
time: logTime(item.log, now),
|
|
65611
65614
|
traceId: toLowerCase(item.log.traceId ?? "")
|
|
65612
65615
|
})), { concurrency: 1 }));
|
|
65613
65616
|
}),
|