Skip to content

Commit

Permalink
telemetry: use client spans for trace root and github action
Browse files Browse the repository at this point in the history
  • Loading branch information
kimtore committed Sep 16, 2024
1 parent dc7ad55 commit fd49ef4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/telemetry/telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,13 @@ func (pt *PipelineTimings) Validate() error {

func (pt *PipelineTimings) StartTracing(ctx context.Context) (context.Context, otrace.Span) {
if pt == nil {
return Tracer().Start(ctx, "Continuous integration pipeline", otrace.WithSpanKind(otrace.SpanKindServer))
return Tracer().Start(ctx, "Continuous integration pipeline", otrace.WithSpanKind(otrace.SpanKindClient))
}

rootCtx, rootSpan := Tracer().Start(ctx, "Continuous integration pipeline", otrace.WithTimestamp(pt.LatestCommit), otrace.WithSpanKind(otrace.SpanKindServer))
rootCtx, rootSpan := Tracer().Start(ctx, "Continuous integration pipeline", otrace.WithTimestamp(pt.LatestCommit), otrace.WithSpanKind(otrace.SpanKindClient))
rootSpan.AddEvent("Latest commit to repository", otrace.WithTimestamp(pt.LatestCommit))
{
ciCtx, ciSpan := Tracer().Start(rootCtx, "Github Action: docker-build-push", otrace.WithTimestamp(pt.Start), otrace.WithAttributes())
ciCtx, ciSpan := Tracer().Start(rootCtx, "Github Action: docker-build-push", otrace.WithTimestamp(pt.Start), otrace.WithSpanKind(otrace.SpanKindClient))
{
_, buildSpan := Tracer().Start(ciCtx, "Docker: Build and push", otrace.WithTimestamp(pt.BuildStart))
buildSpan.End(otrace.WithTimestamp(pt.AttestStart))
Expand Down

0 comments on commit fd49ef4

Please sign in to comment.