package tracing

import "github.com/moby/buildkit/util/tracing"

Index

Variables

var DefaultClient = &http.Client{
	Transport: DefaultTransport,
}
var DefaultTransport = NewTransport(http.DefaultTransport)

Functions

func ContextWithSpanFromContext

func ContextWithSpanFromContext(ctx, ctx2 context.Context) context.Context

ContextWithSpanFromContext sets the tracing span of a context from other context if one is not already set. Alternative would be context.WithoutCancel() that would copy the context but reset ctx.Done

func FinishWithError

func FinishWithError(span trace.Span, err error)

FinishWithError finalizes the span and sets the error if one is passed

func NewTransport

func NewTransport(rt http.RoundTripper) http.RoundTripper

func StartSpan

func StartSpan(ctx context.Context, operationName string, opts ...trace.SpanStartOption) (trace.Span, context.Context)

StartSpan starts a new span as a child of the span in context. If there is no span in context then this is a no-op.

Types

type MultiSpan

type MultiSpan struct {
	trace.Span
}

func NewMultiSpan

func NewMultiSpan() *MultiSpan

func (*MultiSpan) Add

func (ms *MultiSpan) Add(s trace.Span)

Source Files

multispan.go tracing.go

Directories

PathSynopsis
util/tracing/detect
util/tracing/detect/delegated
util/tracing/detect/jaeger
util/tracing/env
util/tracing/exec
util/tracing/otlptracegrpc
util/tracing/transform
Version
v0.12.5
Published
Jan 31, 2024
Platform
js/wasm
Imports
12 packages
Last checked
12 hours ago

Tools for package owners.