@sebspark/otel 0.3.0 → 0.3.1
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/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -233,8 +233,8 @@ function formatSpans(spans) {
|
|
|
233
233
|
const totalDuration = rootEnd - rootStart;
|
|
234
234
|
const service = formatService(rootSpan.resource);
|
|
235
235
|
const timestamp = formatTimestamp(rootSpan.startTime);
|
|
236
|
-
const
|
|
237
|
-
const lines = [`${service} ${timestamp} ${
|
|
236
|
+
const traceId = colors.gray(`[${rootSpan.spanContext().traceId}]`);
|
|
237
|
+
const lines = [`${service} ${timestamp} ${traceId}`];
|
|
238
238
|
for (const span of spans) {
|
|
239
239
|
const offset = hrTimeToMillis(span.startTime) - rootStart;
|
|
240
240
|
const depth = computeDepth(span, spans);
|
|
@@ -255,8 +255,8 @@ function formatSpan(span, opts) {
|
|
|
255
255
|
const desc = formatDescription(span);
|
|
256
256
|
const status = formatStatus(span);
|
|
257
257
|
const duration = formatDuration(span, opts?.offsetMs);
|
|
258
|
-
const
|
|
259
|
-
return `${label} ${barColor(bar)} ${desc} ${status} ${duration} ${
|
|
258
|
+
const spanId = colors.gray(`[${span.spanContext().spanId}]`);
|
|
259
|
+
return `${label} ${barColor(bar)} ${desc} ${status} ${duration} ${spanId}`;
|
|
260
260
|
}
|
|
261
261
|
function formatLabel(span, depth) {
|
|
262
262
|
const indent = " ".repeat(depth);
|
package/dist/index.mjs
CHANGED
|
@@ -204,8 +204,8 @@ function formatSpans(spans) {
|
|
|
204
204
|
const totalDuration = rootEnd - rootStart;
|
|
205
205
|
const service = formatService(rootSpan.resource);
|
|
206
206
|
const timestamp = formatTimestamp(rootSpan.startTime);
|
|
207
|
-
const
|
|
208
|
-
const lines = [`${service} ${timestamp} ${
|
|
207
|
+
const traceId = colors.gray(`[${rootSpan.spanContext().traceId}]`);
|
|
208
|
+
const lines = [`${service} ${timestamp} ${traceId}`];
|
|
209
209
|
for (const span of spans) {
|
|
210
210
|
const offset = hrTimeToMillis(span.startTime) - rootStart;
|
|
211
211
|
const depth = computeDepth(span, spans);
|
|
@@ -226,8 +226,8 @@ function formatSpan(span, opts) {
|
|
|
226
226
|
const desc = formatDescription(span);
|
|
227
227
|
const status = formatStatus(span);
|
|
228
228
|
const duration = formatDuration(span, opts?.offsetMs);
|
|
229
|
-
const
|
|
230
|
-
return `${label} ${barColor(bar)} ${desc} ${status} ${duration} ${
|
|
229
|
+
const spanId = colors.gray(`[${span.spanContext().spanId}]`);
|
|
230
|
+
return `${label} ${barColor(bar)} ${desc} ${status} ${duration} ${spanId}`;
|
|
231
231
|
}
|
|
232
232
|
function formatLabel(span, depth) {
|
|
233
233
|
const indent = " ".repeat(depth);
|