Skip to content

Commit df0fb6f

Browse files
ArthurSensroboquat
authored andcommitted
.werft: Add honeycomb trace as job result
Signed-off-by: ArthurSens <[email protected]>
1 parent 3acf43d commit df0fb6f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.werft/util/werft.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ export class Werft {
107107
}
108108

109109
public endAllSpans() {
110+
const traceID = this.rootSpan.spanContext().traceId
111+
const nowUnix = Math.round(new Date().getTime() / 1000);
112+
// At the moment we're just looking for traces in a 30 minutes timerange with the specific traceID
113+
// A smarter approach would be to get a start timestamp from tracing.Initialize()
114+
exec(`werft log result -d "Honeycomb trace" -c github-check-honeycomb-trace url "https://ui.honeycomb.io/gitpod/datasets/werft/trace?trace_id=${traceID}&trace_start_ts=${nowUnix - 1800}&trace_end_ts=${nowUnix + 5}"`);
110115
this.endPhase()
111116
this.rootSpan.end()
112117
}

0 commit comments

Comments
 (0)